Small fixes

bigfonts crash fix
flexbox crash fix when using setJustifyContent
This commit is contained in:
Robert Jelic
2023-06-17 16:31:00 +02:00
parent cc43817f34
commit 63f88f8184
2 changed files with 6 additions and 4 deletions

View File

@@ -30,7 +30,7 @@ return function(name, basalt)
end end
end end
end end
if(typ=="table")then if(type(typ)=="table")then
for _,v in pairs(typ)do for _,v in pairs(typ)do
if(v==value)then if(v==value)then
isValid = true isValid = true
@@ -63,10 +63,12 @@ return function(name, basalt)
end end
if(not isValid)then if(not isValid)then
local t = type(value)
if(type(typ)=="table")then if(type(typ)=="table")then
typ = table.concat(typ, ", ") typ = table.concat(typ, ", ")
t = value
end end
error(self:getType()..": Invalid type for property "..name.."! Expected "..typ..", got "..type(value)) error(self:getType()..": Invalid type for property "..name.."! Expected "..typ..", got "..t)
end end
return value return value
end end

View File

@@ -207,8 +207,8 @@ return {
oby = oby or math.floor((oY - cY) / 2) + 1 oby = oby or math.floor((oY - cY) / 2) + 1
for i = 1, cY do for i = 1, cY do
self:addFG(1, i, bigfont[2][i]) self:addFg(1, i, bigfont[2][i])
self:addBG(1, i, bigfont[3][i]) self:addBg(1, i, bigfont[3][i])
self:addText(1, i, bigfont[1][i]) self:addText(1, i, bigfont[1][i])
end end
end end