Changeset 5953 in orxonox.OLD for trunk/src/lib/parser/ini_parser
- Timestamp:
- Dec 7, 2005, 1:58:39 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/parser/ini_parser/ini_parser.cc
r5952 r5953 125 125 FILE* stream; //< The stream we use to read the file. 126 126 int lineCount = 0; //< The Count of lines. 127 128 127 129 128 if (this->fileName != NULL) … … 448 447 { 449 448 std::list<IniEntry>::const_iterator entry = this->getEntryIT(entryName, sectionName); 450 if ( !strcmp((*entry).name, entryName))449 if (entry != NULL && !strcmp((*entry).name, entryName)) 451 450 return (*entry).value; 452 451 PRINTF(2)("Entry '%s' in section '%s' not found.\n", entryName, sectionName); … … 618 617 if (!strcmp((*entry).name, entryName)) 619 618 break; 620 return entry; 619 if (entry == (*section).entries.end()) 620 return NULL; 621 else 622 return entry; 621 623 } 622 624 … … 638 640 if (!strcmp((*entry).name, entryName)) 639 641 break; 640 return entry; 642 if (entry == (*section).entries.end()) 643 return NULL; 644 else 645 return entry; 641 646 } 642 647
Note: See TracChangeset
for help on using the changeset viewer.