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:
@@ -213,7 +213,7 @@ std::ostream& operator << (std::ostream& out, const Tab& t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto nl = s.rfind('\n');
|
auto nl = s.rfind('\n');
|
||||||
if (nl < 0) nl = 0;
|
if (nl == std::string::npos) nl = 0;
|
||||||
int column = 0;
|
int column = 0;
|
||||||
for (auto i = nl+1; i != s.size(); ++i) {
|
for (auto i = nl+1; i != s.size(); ++i) {
|
||||||
if (s[i] == '\t')
|
if (s[i] == '\t')
|
||||||
|
|||||||
Reference in New Issue
Block a user