mirror of
https://github.com/janet-lang/janet
synced 2025-11-13 13:57:19 +00:00
Error on buffer/push-uint16 with non 16 bit unsigned integer.
This commit is contained in:
@@ -375,7 +375,7 @@ JANET_CORE_FN(cfun_buffer_push_uint16,
|
||||
uint16_t data;
|
||||
uint8_t bytes[2];
|
||||
} u;
|
||||
u.data = (uint16_t) janet_getuinteger(argv, 2);
|
||||
u.data = janet_getuinteger16(argv, 2);
|
||||
if (reverse) {
|
||||
uint8_t temp = u.bytes[1];
|
||||
u.bytes[1] = u.bytes[0];
|
||||
|
||||
Reference in New Issue
Block a user