bit_converter.lua: fixed the bytes_to_string function

This commit is contained in:
Onran 2024-03-15 00:51:21 +09:00 committed by GitHub
parent ef356557e6
commit c17ce3ef9e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -196,7 +196,7 @@ function bit_converter.bytes_to_string(bytes)
local str = ""
for i = 1, len do
str = str..string.char(bytes[i])
str = str..string.char(bytes[i + 2])
end
return str
@ -265,4 +265,4 @@ function bit_converter.bytes_to_int16(bytes)
return bit_converter.bytes_to_uint16(bytes) - MAX_INT16
end
return bit_converter
return bit_converter