Skip to content

Commit b2932de

Browse files
committed
fix windows build
1 parent 94156de commit b2932de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/core/gps/tok.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,10 @@ double nmea_atof( const char *str, int str_sz )
8585

8686
if ( str_sz < NMEA_CONVSTR_BUF )
8787
{
88+
const char *oldlocale = setlocale( LC_NUMERIC, NULL );
89+
8890
memcpy( &buff[0], str, str_sz );
8991
buff[str_sz] = '\0';
90-
const char *oldlocale = setlocale( LC_NUMERIC, NULL );
9192
setlocale( LC_NUMERIC, "C" );
9293
res = strtod( &buff[0], &tmp_ptr );
9394
setlocale( LC_NUMERIC, oldlocale );

0 commit comments

Comments
 (0)