[Commits] [wesnoth/wesnoth] d26c4d: Respect lua_next constraints
GitHub
noreply at github.com
Thu Nov 9 22:18:51 UTC 2017
Branch: refs/heads/GL_lua_next
Home: https://github.com/wesnoth/wesnoth
Commit: d26c4dcfc186ac23292b6f92dea1062e514d91f7
https://github.com/wesnoth/wesnoth/commit/d26c4dcfc186ac23292b6f92dea1062e514d91f7
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: 37cc0c82f284adc6c3a2f378f57788bc749a6824
https://github.com/wesnoth/wesnoth/commit/37cc0c82f284adc6c3a2f378f57788bc749a6824
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/fbfc673d1b3f...37cc0c82f284
More information about the Commits
mailing list