We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 94156de commit b2932deCopy full SHA for b2932de
src/core/gps/tok.c
@@ -85,9 +85,10 @@ double nmea_atof( const char *str, int str_sz )
85
86
if ( str_sz < NMEA_CONVSTR_BUF )
87
{
88
+ const char *oldlocale = setlocale( LC_NUMERIC, NULL );
89
+
90
memcpy( &buff[0], str, str_sz );
91
buff[str_sz] = '\0';
- const char *oldlocale = setlocale( LC_NUMERIC, NULL );
92
setlocale( LC_NUMERIC, "C" );
93
res = strtod( &buff[0], &tmp_ptr );
94
setlocale( LC_NUMERIC, oldlocale );
0 commit comments