diff options
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 23035fa66d..f0ac2f8eaf 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -12773,9 +12773,9 @@ static IrInstruction *ir_analyze_cast(IrAnalyze *ira, IrInstruction *source_inst } } - // *[N]T to [*]T + // *[N]T to [*]T and [*c]T if (wanted_type->id == ZigTypeIdPointer && - wanted_type->data.pointer.ptr_len == PtrLenUnknown && + (wanted_type->data.pointer.ptr_len == PtrLenUnknown || wanted_type->data.pointer.ptr_len == PtrLenC) && actual_type->id == ZigTypeIdPointer && actual_type->data.pointer.ptr_len == PtrLenSingle && actual_type->data.pointer.child_type->id == ZigTypeIdArray) |
