commit 79f74943b525daa06f2b2c3d460da97a88aee5bb (tree)
parent 9b5737b5a6c6dab61917d17ce9eec35e5978942b
Author: Daniele Cocca <daniele.cocca@gmail.com>
Date: Tue, 15 Mar 2022 10:20:24 +0000
CBE: fix output of airMinMax()
This was trying to output a ternary operator, but the output was broken
by the lack of a '?'.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/codegen/c.zig b/src/codegen/c.zig
@@ -2541,7 +2541,7 @@ fn airMinMax(f: *Function, inst: Air.Inst.Index, operator: [*:0]const u8) !CValu
try f.writeCValue(writer, lhs);
try writer.print("{s}", .{operator});
try f.writeCValue(writer, rhs);
- try writer.writeAll(") ");
+ try writer.writeAll(") ? ");
try f.writeCValue(writer, lhs);
try writer.writeAll(" : ");
try f.writeCValue(writer, rhs);