1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-01-12 10:20:28 +00:00

Fix textutils.serializeJSON argument check

This commit is contained in:
CrazedProgrammer 2017-07-25 22:36:54 +02:00
parent 1850dcdf38
commit 96288164c5

View File

@ -332,7 +332,7 @@ function unserialize( s )
end
function serializeJSON( t, bNBTStyle )
if type( t ) ~= "table" or type( t ) == "string" or type( t ) == "number" or type( t ) == "boolean" then
if type( t ) ~= "table" and type( t ) ~= "string" and type( t ) ~= "number" and type( t ) ~= "boolean" then
error( "bad argument #1 (expected table/string/number/boolean, got " .. type( t ) .. ")", 2 )
end
if bNBTStyle ~= nil and type( bNBTStyle ) ~= "boolean" then