1
0
Fork 0

Linear Features: exit cleanly when GenApts comes across unrecognized linear features (avoid high memory consumption)

This commit is contained in:
legoboyvdlp R 2019-06-06 21:38:37 +01:00
parent a9e26a6099
commit 17bd9d49c6
2 changed files with 7 additions and 0 deletions

View file

@ -604,6 +604,11 @@ int LinearFeature::Finish( bool closed, unsigned int idx )
cur_light_contour.SetType( "RWY_RED_LIGHTS" );
light_delta = 10.0f;
break;
default:
// catch unknown lighting type. Allows TerraGear to exit cleanly when it comes across new light features 107 and 108
TG_LOG(SG_GENERAL, SG_ALERT, "LinearFeature::Finish: unknown lighting feature " << lights[i]->type );
exit(1);
}
for (unsigned int j = lights[i]->start_idx; j <= lights[i]->end_idx; j++)

View file

@ -40,6 +40,8 @@
#define LF_UNIDIR_CLOSE_AMBER_PULSE (104)
#define LF_BIDIR_GREEN_AMBER (105)
#define LF_OMNIDIR_RED (106)
#define LF_OMNIDIR_GREEN (107)
#define LF_OMNIDIR_GREEN_AMBER (108)
struct Marking
{