1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 11:45:53 +01:00

Fixed invalid memory access

This commit is contained in:
Martin Tůma 2018-03-01 19:06:34 +01:00
parent b9ed0c3933
commit 9300d671a1

View File

@ -8,7 +8,8 @@ static double sDMS2deg(double val)
const char *decimal;
QString qstr(QString::number(qAbs(val), 'f', 7));
const char *str = qstr.toLatin1().constData();
QByteArray ba = qstr.toLatin1();
const char *str = ba.constData();
decimal = strrchr(str, '.');
int deg = str2int(str, decimal - str);
int min = str2int(decimal + 1, 2);