Browse Source

fix scan_directory for multifiles

David Rose 17 years ago
parent
commit
aee7748ee3
1 changed files with 2 additions and 2 deletions
  1. 2 2
      panda/src/express/multifile.cxx

+ 2 - 2
panda/src/express/multifile.cxx

@@ -861,12 +861,12 @@ scan_directory(vector_string &contents, const string &subfile_name) const {
     if (!(subfile->_name.length() > prefix.length() &&
           subfile->_name.substr(0, prefix.length()) == prefix)) {
       // We've reached the end of the list of subfiles beneath the
-      // indicated direcotry prefix.
+      // indicated directory prefix.
       return true;
     }
 
     size_t slash = subfile->_name.find('/', prefix.length());
-    string basename = subfile->_name.substr(prefix.length(), slash);
+    string basename = subfile->_name.substr(prefix.length(), slash - prefix.length());
     if (basename != previous) {
       contents.push_back(basename);
       previous = basename;