Prevent crash on Mac when typing comma in GPS coordinates field

Our attempt to skip any white space after the comma causes an ASSERT (strangely
only on Macs).

This closes #158

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2017-01-14 09:09:58 -08:00
parent dd96f05169
commit 1ab6e7fc8a

View file

@ -187,7 +187,7 @@ static bool parseCoord(const QString& txt, int& pos, const QString& positives,
(txt[pos] == ',' || txt[pos] == ';')) { (txt[pos] == ',' || txt[pos] == ';')) {
// next coordinate coming up // next coordinate coming up
// eat the ',' and any subsequent white space // eat the ',' and any subsequent white space
while (txt[++pos].isSpace()) while (++pos < txt.size() && txt[pos].isSpace())
/* nothing */ ; /* nothing */ ;
break; break;
} else { } else {