Commit 91b4729962
Changed files (1)
src
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);