Changeset 5938 in orxonox.OLD for trunk/src/lib/util
- Timestamp:
- Dec 6, 2005, 7:01:46 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/util/ini_parser.cc
r5936 r5938 23 23 #include <stdlib.h> 24 24 #include <string.h> 25 26 #if HAVE_CONFIG_H 27 #include <config.h> 28 #endif 25 29 26 30 #ifdef DEBUG … … 86 90 * @brief sets the Name of the input-file 87 91 * @param fileName The new FileName to set to the IniParser 88 * I FfileName is NULL the new Name will be set to NULL too.92 * If fileName is NULL the new Name will be set to NULL too. 89 93 */ 90 94 void IniParser::setFileName(const char* fileName) … … 92 96 if (this->fileName) 93 97 delete []this->fileName; 94 if (fileName )98 if (fileName != NULL) 95 99 { 96 100 this->fileName = new char[strlen(fileName)+1]; … … 358 362 { 359 363 (*section).entries.push_back(IniEntry()); 360 (*section).entries.back().name = new char[strlen 364 (*section).entries.back().name = new char[strlen(entryName)+1]; 361 365 strcpy((*section).entries.back().name, entryName); 362 366 (*section).entries.back().value = new char[strlen(value)+1]; … … 479 483 PRINTF(1)("no opened ini-file.\n"); 480 484 } 485 486
Note: See TracChangeset
for help on using the changeset viewer.