Skip to content

Commit 280cad7

Browse files
committed
emit_c: fix float literal being emitted as doubles
1 parent 73210e1 commit 280cad7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shady/emit/c/emit_c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ CTerm emit_value(Emitter* emitter, Printer* block_printer, const Node* value) {
237237
float f;
238238
memcpy(&f, &v, sizeof(uint32_t));
239239
double d = (double) f;
240-
emitted = format_string_arena(emitter->arena->arena, "%.9g", d); break;
240+
emitted = format_string_arena(emitter->arena->arena, "%#.9gf", d); break;
241241
}
242242
case FloatTy64: {
243243
double d;

0 commit comments

Comments
 (0)