v2.6.0 - Added support for reading low endian numbers from files, and fixed some bugs with the Unicode library.

This commit is contained in:
Ponali
2025-07-20 17:20:12 +02:00
parent 2965d62655
commit 68e5b70273
4 changed files with 14 additions and 6 deletions
+4 -2
View File
@@ -9,6 +9,8 @@ else
end
function unicodeLib.readCodePoint(readByte)
checkArg(1,readByte,"function")
local function inRange(min,max,...)
for _,v in ipairs({...}) do
if not (v and v>=min and v<max) then return false end
@@ -61,9 +63,9 @@ function unicodeLib.readChar(readByte)
end
function unicodeLib.codepoint(chr)
checkArg(1,readByte,"string")
checkArg(1,chr,"string")
local ptr = 1
return readUniChar(function()
return unicode.readCodePoint(function()
local byte = chr:byte(ptr)
ptr=ptr+1
return byte