From 1ab6e7fc8a76bf68146e54c1c6a00b69955c9c9c Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 14 Jan 2017 09:09:58 -0800 Subject: 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 --- core/qthelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') 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 { -- cgit v1.2.3-70-g09d2