mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 14:01:49 +00:00
bit_converter.lua: fixed the bytes_to_string function
This commit is contained in:
parent
ef356557e6
commit
c17ce3ef9e
1 changed files with 2 additions and 2 deletions
|
|
@ -196,7 +196,7 @@ function bit_converter.bytes_to_string(bytes)
|
||||||
local str = ""
|
local str = ""
|
||||||
|
|
||||||
for i = 1, len do
|
for i = 1, len do
|
||||||
str = str..string.char(bytes[i])
|
str = str..string.char(bytes[i + 2])
|
||||||
end
|
end
|
||||||
|
|
||||||
return str
|
return str
|
||||||
|
|
@ -265,4 +265,4 @@ function bit_converter.bytes_to_int16(bytes)
|
||||||
return bit_converter.bytes_to_uint16(bytes) - MAX_INT16
|
return bit_converter.bytes_to_uint16(bytes) - MAX_INT16
|
||||||
end
|
end
|
||||||
|
|
||||||
return bit_converter
|
return bit_converter
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue