1
0
Fork 0
mirror of https://github.com/subsurface/subsurface.git synced 2025-02-19 22:16:15 +00:00

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 

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 {