Skip to content

Commit

Permalink
Handle an 'f' suffix on float constants
Browse files Browse the repository at this point in the history
  • Loading branch information
mstorsjo committed Sep 6, 2012
1 parent 5ca773c commit 0b631da
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions convert.c
Expand Up @@ -1649,6 +1649,9 @@ static double eval_prim(CXToken *tokens, unsigned *n, unsigned last) {
} else {
char *end;
double d = strtod(str, &end);
// Handle a possible f suffix for float constants
if (end != str && (*end == 'f' || *end == 'F'))
end++;
if (*end != '\0') {
fprintf(stderr, "Unable to parse %s as expression primary\n", str);
exit(1);
Expand Down

0 comments on commit 0b631da

Please sign in to comment.