diff --git a/src/value.zig b/src/value.zig index 16ccc0c642..503797abba 100644 --- a/src/value.zig +++ b/src/value.zig @@ -5390,7 +5390,7 @@ pub const Value = extern union { /// have the same value, return that byte value, otherwise null. pub fn hasRepeatedByteRepr(val: Value, ty: Type, mod: *Module, value_buffer: *Payload.U64) !?Value { const target = mod.getTarget(); - const abi_size = ty.abiSize(target); + const abi_size = std.math.cast(usize, ty.abiSize(target)) orelse return null; assert(abi_size >= 1); const byte_buffer = try mod.gpa.alloc(u8, abi_size); defer mod.gpa.free(byte_buffer);