From: Mathias Froehlich Date: Mon, 25 Feb 2013 18:36:54 +0000 (+0100) Subject: Fix detection of airports in the stg loader. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b322864ef4b763a559de6d5e75a65059783c00a1;p=simgear.git Fix detection of airports in the stg loader. --- diff --git a/simgear/scene/tgdb/ReaderWriterSTG.cxx b/simgear/scene/tgdb/ReaderWriterSTG.cxx index fd408406..30e15fb0 100644 --- a/simgear/scene/tgdb/ReaderWriterSTG.cxx +++ b/simgear/scene/tgdb/ReaderWriterSTG.cxx @@ -61,14 +61,14 @@ static bool isAirportBtg(const std::string& name) { if (name.size() < 8) return false; - if (name.substr(4, 8) != ".btg") + if (name.substr(4, 4) != ".btg") return false; for (unsigned i = 0; i < 4; ++i) { - if (name[i] < 'A' || 'Z' < name[i]) + if ('A' <= name[i] && name[i] <= 'Z') continue; - return true; + return false; } - return false; + return true; } static SGBucket bucketIndexFromFileName(const std::string& fileName)