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

Add Check to textutils.tabulate/pagedTabulate

This commit is contained in:
Wilma456 (Jakob0815) 2017-08-10 13:40:35 +02:00 committed by GitHub
parent 579f7443a8
commit 2c264728d9

View File

@ -122,6 +122,9 @@ local function tabulateCommon( bPaged, ... )
for n, t in ipairs( tAll ) do
if type(t) == "table" then
for n, sItem in pairs(t) do
if type( sItem ) ~= "number" and type( sItem ) ~= "string" then
error( "textutils.tabulate/pagedTabulate only allow strings and numbers in the table", 3 )
end
nMaxLen = math.max( string.len( sItem ) + 1, nMaxLen )
end
end