Browse Source

whoops, screwed up embedded-dot problem again

David Rose 22 years ago
parent
commit
53a6f48537
1 changed files with 1 additions and 1 deletions
  1. 1 1
      pandatool/src/palettizer/paletteImage.cxx

+ 1 - 1
pandatool/src/palettizer/paletteImage.cxx

@@ -219,7 +219,7 @@ PaletteImage(PalettePage *page, int index) :
   // to have a filename extension.  Otherwise, an embedded dot in the
   // group's name would make everything following appear to be an
   // extension, which would get lost in the set_filename() call.
-  if (_basename.find('.') == string::npos) {
+  if (_basename.empty() || _basename[_basename.length() - 1] != '.') {
     _basename += '.';
   }