Skip to content

Instantly share code, notes, and snippets.

@naszar
Created July 2, 2014 11:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naszar/60207b603bf66d699203 to your computer and use it in GitHub Desktop.
Save naszar/60207b603bf66d699203 to your computer and use it in GitHub Desktop.
diff --git a/src/options.c b/src/options.c
index d81d8fb..dcc085c 100644
--- a/src/options.c
+++ b/src/options.c
@@ -331,9 +331,8 @@ int opt_parse_map(char *map){
}
currstr=map;
for( i=0; i<cnt; ++i ){
- currsep=strchr(currstr,',');
currend=strchr(currstr,';');
- curr_map[i].elev=atof(currstr);
+ curr_map[i].elev=strtof(currstr, &currsep);
curr_map[i].temp=atof(++currsep);
if( curr_map[i].elev > prevelev ){
free(curr_map);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment