From 881c4e131b471fe4d36b37d49db217d16a786ca4 Mon Sep 17 00:00:00 2001 From: PSadrozinski Date: Thu, 20 Oct 2011 18:17:41 -0400 Subject: [PATCH] fix for FIndAirport to handle heliports --- src/Airports/GenAirports850/parser.cxx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/Airports/GenAirports850/parser.cxx b/src/Airports/GenAirports850/parser.cxx index 7d74c4aa..4d30ed82 100644 --- a/src/Airports/GenAirports850/parser.cxx +++ b/src/Airports/GenAirports850/parser.cxx @@ -25,6 +25,7 @@ bool Parser::IsAirportDefinition( char* line, string icao ) { case LAND_AIRPORT_CODE: case SEA_AIRPORT_CODE: + case HELIPORT_CODE: airport = new Airport( code, line ); if ( airport->GetIcao() == icao ) { @@ -32,7 +33,6 @@ bool Parser::IsAirportDefinition( char* line, string icao ) } break; - case HELIPORT_CODE: case LAND_RUNWAY_CODE: case WATER_RUNWAY_CODE: case HELIPAD_CODE: @@ -623,8 +623,16 @@ int Parser::ParseLine(char* line) } break; case HELIPORT_CODE: - SetState( STATE_PARSE_SIMPLE ); - SG_LOG(SG_GENERAL, SG_DEBUG, "Parsing heliport: " << line); + if (cur_state == STATE_NONE) + { + SetState( STATE_PARSE_SIMPLE ); + SG_LOG(SG_GENERAL, SG_DEBUG, "Parsing heliport: " << line); + cur_airport = new Airport( code, line ); + } + else + { + SetState( STATE_DONE ); + } break; case LAND_RUNWAY_CODE: