forked from BigfootDev/flatbuffers
[Lua] Fix EnforceNumberAndPack for bool type (#6576)
This commit is contained in:
@@ -73,7 +73,7 @@ local bool_mt =
|
||||
ValidNumber = function(self, n) return true end, -- anything is a valid boolean in Lua
|
||||
EnforceNumber = function(self, n) end, -- anything is a valid boolean in Lua
|
||||
EnforceNumbers = function(self, a, b) end, -- anything is a valid boolean in Lua
|
||||
EnforceNumberAndPack = function(self, n) return self:Pack(value) end,
|
||||
EnforceNumberAndPack = function(self, n) return self:Pack(n) end,
|
||||
}
|
||||
|
||||
local uint8_mt =
|
||||
|
||||
@@ -17,6 +17,7 @@ local function checkReadBuffer(buf, offset, sizePrefix)
|
||||
assert(mon:Hp() == 80, "Monster Hp is not 80")
|
||||
assert(mon:Mana() == 150, "Monster Mana is not 150")
|
||||
assert(mon:Name() == "MyMonster", "Monster Name is not MyMonster")
|
||||
assert(mon:Testbool() == true)
|
||||
|
||||
local vec = assert(mon:Pos(), "Monster Position is nil")
|
||||
assert(vec:X() == 1.0)
|
||||
|
||||
Reference in New Issue
Block a user