Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5101 in orxonox.OLD


Ignore:
Timestamp:
Aug 22, 2005, 3:20:36 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: orxonox starts up in Windows again, but thats all.
Somewhere in the process it gets a sigsegv

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/util/resource_manager.cc

    r5078 r5101  
    9999      this->dataDir = new char[strlen(realDir)+1];
    100100      strcpy(this->dataDir, realDir);
    101       delete realDir;
     101      delete[] realDir;
    102102      return true;
    103103    }
    104104  else
    105105    {
    106       PRINTF(1)("%s is not a Directory, and can not be the Data Directory, leaving as %s \n", dataDir, this->dataDir);
    107       delete realDir;
     106      PRINTF(1)("%s is not a Directory, and can not be the Data Directory, leaving as %s \n", realDir, this->dataDir);
     107      delete[] realDir;
    108108      return false;
    109109    }
     
    631631
    632632  // checking for the termination of the string given. If there is a "/" at the end cut it away
    633   if (directoryName[strlen(directoryName)-1] == '/')
     633  if (directoryName[strlen(directoryName)-1] == '/' ||
     634      directoryName[strlen(directoryName)-1] == '\\')
    634635    {
    635636      tmpDirName = new char[strlen(directoryName)+1];
     
    651652                            ))
    652653        {
    653           delete tmpDirName;
     654          delete[] tmpDirName;
    654655          return true;
    655656        }
Note: See TracChangeset for help on using the changeset viewer.