[Commits] [wesnoth/wesnoth] ddc9e6: Respect lua_next constraints
GitHub
noreply at github.com
Thu Nov 9 22:22:49 UTC 2017
Branch: refs/heads/GL_lua_next
Home: https://github.com/wesnoth/wesnoth
Commit: ddc9e6e69dcd7faeb24d6c58f17e17031bb5b478
https://github.com/wesnoth/wesnoth/commit/ddc9e6e69dcd7faeb24d6c58f17e17031bb5b478
Author: Gregory A Lundberg <gregory_lundberg at gmx.com>
Date: 2017-11-09 (Thu, 09 Nov 2017)
Changed paths:
M src/scripting/lua_common.cpp
M src/scripting/lua_formula_bridge.cpp
M src/scripting/lua_kernel_base.cpp
Log Message:
-----------
Respect lua_next constraints
The key value returned by lua_next, on the Lua stack, cannot be modified.
Certain tests such as lua_isstring will convert the value.
The solution is, instead of testing if they key can be converted to a string, test if it actually is a string by using lua_type.
Commit: 2be2a519732a1b85cadb71670521d3ef1943e317
https://github.com/wesnoth/wesnoth/commit/2be2a519732a1b85cadb71670521d3ef1943e317
Author: Gregory A Lundberg <gregory_lundberg at gmx.com>
Date: 2017-11-09 (Thu, 09 Nov 2017)
Changed paths:
M src/scripting/lua_kernel_base.cpp
Log Message:
-----------
Do not lua_next on userdata.
Ever.
Really.
YOU HAVE BEEN WARNED!
Closes #2171
Compare: https://github.com/wesnoth/wesnoth/compare/37cc0c82f284...2be2a519732a
More information about the Commits
mailing list