diff options
-rw-r--r-- | lua/flatbuffers/numTypes.lua | 2 | ||||
-rw-r--r-- | tests/luatest.lua | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lua/flatbuffers/numTypes.lua b/lua/flatbuffers/numTypes.lua index 01f41993..289fa59c 100644 --- a/lua/flatbuffers/numTypes.lua +++ b/lua/flatbuffers/numTypes.lua @@ -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 = diff --git a/tests/luatest.lua b/tests/luatest.lua index e60f837d..a2a9d639 100644 --- a/tests/luatest.lua +++ b/tests/luatest.lua @@ -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) |