Planimeter / game-engine-2d

Planimeter Game Engine 2D - LÖVE-based game engine for Lua
https://github.com/Planimeter/game-engine-2d/wiki
MIT License
736 stars 74 forks source link

Fix tobool logic for booleans. #105

Closed GamerGambit closed 1 year ago

GamerGambit commented 3 years ago

baselib/toboolean logic is currently broken for booleans since tonumber(true) returns nil.

] lua_dostring print(toboolean(true))
false

This PR adds a type check for booleans.