Commit 9d0a4b60e1

Cody Tapscott <topolarity@tapscott.me>
2022-10-19 21:02:21
Value: Add `@intCast` in `writeToPackedMemory` for 32-bit targets
1 parent 3295fee
Changed files (1)
src/value.zig
@@ -1357,9 +1357,9 @@ pub const Value = extern union {
                 else => unreachable,
             },
             .Vector => {
-                const len = ty.arrayLen();
                 const elem_ty = ty.childType();
                 const elem_bit_size = @intCast(u16, elem_ty.bitSize(target));
+                const len = @intCast(usize, ty.arrayLen());
 
                 var bits: u16 = 0;
                 var elem_i: usize = 0;