diff options
Diffstat (limited to 'dimension/parse.c')
-rw-r--r-- | dimension/parse.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/dimension/parse.c b/dimension/parse.c index da22cb2..54b5880 100644 --- a/dimension/parse.c +++ b/dimension/parse.c @@ -1754,8 +1754,10 @@ dmnsn_print_astnode(FILE *file, dmnsn_astnode astnode) case DMNSN_AST_FLOAT: dvalue = *(double *)astnode.ptr; /* Don't print -0 */ - if (dvalue == 0.0) dvalue = 0.0; - fprintf(file, "(%s %g)", dmnsn_astnode_string(astnode.type), dvalue); + if (dvalue == 0.0) + fprintf(file, "(%s 0)", dmnsn_astnode_string(astnode.type)); + else + fprintf(file, "(%s %g)", dmnsn_astnode_string(astnode.type), dvalue); break; case DMNSN_AST_STRING: |