1
0
Fork 0

Fix a bug that could put the same airport object in the final .stg file twice,

doesn't affect rendering, but could affect render performance.
This commit is contained in:
curt 2004-12-06 22:25:56 +00:00
parent 650bbd7e51
commit fd8f816ee1

View file

@ -1004,9 +1004,12 @@ static void do_custom_objects( const TGConstruct& c ) {
} else {
while ( ! in.eof() ) {
in.getline(line, 2048);
cout << "line = " << line << endl;
sscanf( line, "%s %s", token, name );
int result = sscanf( line, "%s %s", token, name );
cout << "scanf scanned " << result << " tokens" << endl;
if ( result > 0 ) {
cout << "token = " << token << " name = " << name << endl;
if ( strcmp( token, "OBJECT" ) == 0 ) {
@ -1027,6 +1030,7 @@ static void do_custom_objects( const TGConstruct& c ) {
}
}
}
}
fclose(fp);
}