Skip to content

Commit 68678b4

Browse files
committed
fix: change the byte length
1 parent 1bc2eef commit 68678b4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

bindings/napi/to_napi_value.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub fn sszValueToNapiValue(env: napi.Env, comptime ST: type, value: *const ST.Ty
1313
if (comptime ssz.isByteVectorType(ST)) {
1414
var bytes: [*]u8 = undefined;
1515
const buf = try env.createArrayBuffer(ST.length, &bytes);
16-
@memcpy(bytes[0..32], value);
16+
@memcpy(bytes[0..ST.length], value);
1717
return try env.createTypedarray(.uint8, ST.length, buf, 0);
1818
} else {
1919
const arr = try env.createArrayWithLength(ST.length);

0 commit comments

Comments
 (0)