[Commits] [wesnoth/wesnoth] fc21eb: Respect lua_next constraints
GitHub
noreply at github.com
Mon Nov 13 01:48:59 UTC 2017
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: fc21ebf1bebe1681bfff8075cde3e4143e6ace0b
https://github.com/wesnoth/wesnoth/commit/fc21ebf1bebe1681bfff8075cde3e4143e6ace0b
Author: Gregory A Lundberg <gregory_lundberg at gmx.com>
Date: 2017-11-12 (Sun, 12 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: 44526a4bade418c03f6bdfc085bacd15ab619398
https://github.com/wesnoth/wesnoth/commit/44526a4bade418c03f6bdfc085bacd15ab619398
Author: Gregory A Lundberg <gregory_lundberg at gmx.com>
Date: 2017-11-12 (Sun, 12 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/70e1447366ea...44526a4bade4
More information about the Commits
mailing list