Skip to content
Permalink
Browse files
fix windows build
  • Loading branch information
jef-n committed Jan 5, 2013
1 parent 94156de commit b2932deca188a59d2eeffbaf06acda748a31fd93
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/core/gps/tok.c
@@ -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 );

0 comments on commit b2932de

Please sign in to comment.