diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-01-14 09:09:58 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-01-14 09:09:58 -0800 |
commit | 1ab6e7fc8a76bf68146e54c1c6a00b69955c9c9c (patch) | |
tree | e7844f2c7c773bb9231a009da077a3d8046dcac2 /core/qthelper.cpp | |
parent | dd96f051694714f25cd0e3798bfacea3d1b6de49 (diff) | |
download | subsurface-1ab6e7fc8a76bf68146e54c1c6a00b69955c9c9c.tar.gz |
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>
Diffstat (limited to 'core/qthelper.cpp')
-rw-r--r-- | core/qthelper.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/qthelper.cpp b/core/qthelper.cpp index 1034316bb..f9e504ece 100644 --- a/core/qthelper.cpp +++ b/core/qthelper.cpp @@ -187,7 +187,7 @@ static bool parseCoord(const QString& txt, int& pos, const QString& positives, (txt[pos] == ',' || txt[pos] == ';')) { // next coordinate coming up // eat the ',' and any subsequent white space - while (txt[++pos].isSpace()) + while (++pos < txt.size() && txt[pos].isSpace()) /* nothing */ ; break; } else { |