Skip to content

Commit 0daa77b

Browse files
committed
stage2 cbe: correct airIsNull ptr operand check
1 parent f46d730 commit 0daa77b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/codegen/c.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3252,7 +3252,7 @@ fn airIsNull(
32523252

32533253
const ty = f.air.typeOf(un_op);
32543254
var opt_buf: Type.Payload.ElemType = undefined;
3255-
const payload_ty = if (ty.zigTypeTag() == .Pointer)
3255+
const payload_ty = if (deref_suffix[0] != 0)
32563256
ty.childType().optionalChild(&opt_buf)
32573257
else
32583258
ty.optionalChild(&opt_buf);

0 commit comments

Comments
 (0)