We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 9385ac9 commit b75c89bCopy full SHA for b75c89b
src/core/gps/tok.c
@@ -34,6 +34,7 @@
34
#include <ctype.h>
35
#include <string.h>
36
#include <limits.h>
37
+#include <locale.h>
38
39
#define NMEA_TOKS_COMPARE (1)
40
#define NMEA_TOKS_PERCENT (2)
@@ -86,7 +87,10 @@ double nmea_atof( const char *str, int str_sz )
86
87
{
88
memcpy( &buff[0], str, str_sz );
89
buff[str_sz] = '\0';
90
+ const char *oldlocale = setlocale( LC_NUMERIC, NULL );
91
+ setlocale( LC_NUMERIC, "C" );
92
res = strtod( &buff[0], &tmp_ptr );
93
+ setlocale( LC_NUMERIC, oldlocale );
94
}
95
96
return res;
0 commit comments