Fixed handling of numerical values in [case] statements. (Fix for bug #16370.)

This commit is contained in:
Guillaume Melquiond 2010-08-06 13:23:34 +00:00
parent 8b1e74f181
commit e8c2fcfab6

View file

@ -353,9 +353,9 @@ function wml_actions.switch(cfg)
local found = false
-- Execute all the [case]s where the value matches.
for v in helper.child_range(cfg, "case") do
local match = false
local match = false
for w in string.gmatch(v.value, "[^%s,][^,]*") do
if w == value then match = true end
if w == tostring(value) then match = true ; break end
end
if match then
handle_event_commands(v)