1
0
Fork 0

doesn't crash on old configfiles anymore

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@650
This commit is contained in:
Peter Veenstra 2003-01-20 20:01:49 +00:00
parent 1dc03e1a4c
commit b7088bb6e6

View file

@ -1,5 +1,5 @@
/*
* Copyright (C) 2002 The DOSBox Team
* Copyright (C) 2002-2003 The DOSBox Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -222,7 +222,8 @@ void Config::ParseConfigFile(const char* configfilename){
return;
}
char gegevens[150];
Section* currentsection;
Section* currentsection = NULL;
Section* testsec = NULL;
while (in) {
in.getline(gegevens,150);
char* temp;
@ -237,7 +238,9 @@ void Config::ParseConfigFile(const char* configfilename){
case '[':
temp = strrchr(gegevens,']');
*temp=0;
currentsection=GetSection(&gegevens[1]);
testsec = GetSection(&gegevens[1]);
if(testsec != NULL ) currentsection = testsec;
testsec = NULL;
break;
default:
try{