Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix windows build
  • Loading branch information
jef-n committed Jan 5, 2013
1 parent 94156de commit b2932de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/gps/tok.c
Expand Up @@ -85,9 +85,10 @@ double nmea_atof( const char *str, int str_sz )

if ( str_sz < NMEA_CONVSTR_BUF )
{
const char *oldlocale = setlocale( LC_NUMERIC, NULL );

memcpy( &buff[0], str, str_sz );
buff[str_sz] = '\0';
const char *oldlocale = setlocale( LC_NUMERIC, NULL );
setlocale( LC_NUMERIC, "C" );
res = strtod( &buff[0], &tmp_ptr );
setlocale( LC_NUMERIC, oldlocale );
Expand Down

0 comments on commit b2932de

Please sign in to comment.