fix: byteutil.unpack 'b' is equivalent of 'B'

This commit is contained in:
MihailRis 2025-10-10 19:57:53 +03:00
parent 51a8ed6737
commit 2a9507b54e

View File

@ -137,7 +137,7 @@ static int l_unpack(lua::State* L) {
for (size_t i = 0; format[i]; i++) {
switch (format[i]) {
case 'b':
lua::pushinteger(L, reader.get());
lua::pushinteger(L, static_cast<int8_t>(reader.get()));
break;
case 'B':
lua::pushinteger(L, reader.get() & 0xFF);