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.
This commit is contained in:
Stuart Buchanan 2020-09-09 21:44:20 +01:00
parent 6ab7f68f4b
commit 35b1d321fe

View File

@ -466,8 +466,8 @@ typedef QuadTreeBuilder<LOD*, SGBuildingBin::BuildingInstance, MakeBuildingLeaf,
int b = 0, s = 0, o = 0, f = 0, wt = 0, rt = 0;
in >> 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;
}