From b279384aefc5e770a23507786f1b9b7dc6318868 Mon Sep 17 00:00:00 2001 From: Stuart Buchanan Date: Wed, 9 Sep 2020 21:44:20 +0100 Subject: [PATCH] Check correctly for failed BUILDING_LIST Previous additional checks for a value BUILDING_LIST entry used an enum incorrectly, resulting in all BUILDING_LIST entries failing. Now fixed to check bad() / fail() which are bool. --- simgear/scene/tgdb/SGBuildingBin.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simgear/scene/tgdb/SGBuildingBin.cxx b/simgear/scene/tgdb/SGBuildingBin.cxx index 386db9db..0c7a8d82 100644 --- a/simgear/scene/tgdb/SGBuildingBin.cxx +++ b/simgear/scene/tgdb/SGBuildingBin.cxx @@ -466,8 +466,8 @@ typedef QuadTreeBuilder> x >> y >> z >> r >> b; - if (in.failbit) { - SG_LOG(SG_TERRAIN, SG_WARN, "Error parsing build entry in: " << absoluteFileName); + if (in.bad() || in.fail()) { + SG_LOG(SG_TERRAIN, SG_WARN, "Error parsing build entry in: " << absoluteFileName << " line: \"" << line << "\""); continue; }