Use return instead of goto in [while]
This commit is contained in:
parent
aa2e24d1b7
commit
5353dfb439
1 changed files with 2 additions and 3 deletions
|
@ -321,17 +321,16 @@ wml_actions["while"] = function( cfg )
|
|||
local action = utils.handle_event_commands(do_child, "loop")
|
||||
if action == "break" then
|
||||
utils.set_exiting("none")
|
||||
goto exit
|
||||
return
|
||||
elseif action == "continue" then
|
||||
utils.set_exiting("none")
|
||||
break
|
||||
elseif action ~= "none" then
|
||||
goto exit
|
||||
return
|
||||
end
|
||||
end
|
||||
else return end
|
||||
end
|
||||
::exit::
|
||||
end
|
||||
|
||||
wml_actions["break"] = function(cfg)
|
||||
|
|
Loading…
Add table
Reference in a new issue