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:
parent
0da173cfd8
commit
109da4eb49
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user