From: mfranz Date: Wed, 11 Jul 2007 15:18:24 +0000 (+0000) Subject: a token can be empty (empty line), in which case there's no token[0] X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1e6fa7d2a5e04605e7198dee00b3cabeaadc1e50;p=flightgear.git a token can be empty (empty line), in which case there's no token[0] --- diff --git a/src/Scenery/tileentry.cxx b/src/Scenery/tileentry.cxx index 0b7ea455d..2d7e44f2e 100644 --- a/src/Scenery/tileentry.cxx +++ b/src/Scenery/tileentry.cxx @@ -302,7 +302,7 @@ FGTileEntry::load( const string_list &path_list, bool is_base ) string token; in >> token; - if ( token[0] == '#' ) { + if ( token.empty() || token[0] == '#' ) { in >> ::skipeol; continue; }