mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 22:03:23 +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 #158 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
dd96f05169
commit
1ab6e7fc8a
1 changed files with 1 additions and 1 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Add table
Reference in a new issue