diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-06-06 16:20:36 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-06-06 16:20:36 -0400 |
| commit | 31c8d0af1597b6b4996a90808b1b8c0983db309e (patch) | |
| tree | 5645f0d276c2f2062d68c8be8e2f01b572f10816 /compile.c | |
| parent | e9abf8a370b0256f96108048eec95b68ef92effc (diff) | |
Fix float literals for integer floats
Diffstat (limited to 'compile.c')
| -rw-r--r-- | compile.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1025,7 +1025,7 @@ CORD compile(env_t *env, ast_t *ast) } case Int: return CORD_asprintf("I%ld(%ld)", Match(ast, Int)->bits, Match(ast, Int)->i); case Num: { - return CORD_asprintf(Match(ast, Num)->bits == 64 ? "%.9g" : "%.9gf", Match(ast, Num)->n); + return CORD_asprintf(Match(ast, Num)->bits == 64 ? "%.9g" : "(float)%.9g", Match(ast, Num)->n); } case Length: { ast_t *expr = Match(ast, Length)->value; |
