simgear/environment/metar.cxx: fix use of std::string::rfind().

Need to compare result with std::string::npos, not for -ve.
This commit is contained in:
Julian Smith 2021-05-23 12:40:42 +01:00
parent 0da173cfd8
commit 109da4eb49

View File

@ -213,7 +213,7 @@ std::ostream& operator << (std::ostream& out, const Tab& t)
}
auto nl = s.rfind('\n');
if (nl < 0) nl = 0;
if (nl == std::string::npos) nl = 0;
int column = 0;
for (auto i = nl+1; i != s.size(); ++i) {
if (s[i] == '\t')