fix @intCast not catching negative numbers to unsigned
This commit is contained in:
@@ -1645,7 +1645,7 @@ static LLVMValueRef gen_widen_or_shorten(CodeGen *g, bool want_runtime_safety, Z
|
||||
zig_unreachable();
|
||||
}
|
||||
|
||||
if (actual_bits >= wanted_bits && actual_type->id == ZigTypeIdInt &&
|
||||
if (actual_type->id == ZigTypeIdInt &&
|
||||
!wanted_type->data.integral.is_signed && actual_type->data.integral.is_signed &&
|
||||
want_runtime_safety)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user