Bug fix to returning values inside of a loop

This commit is contained in:
Jonathan Turner
2009-07-06 13:01:28 +00:00
parent 494335fb09
commit 26f5d25243
2 changed files with 3 additions and 2 deletions

View File

@@ -556,8 +556,9 @@ namespace chaiscript
retval = eval_token(ss, node->children[i]);
}
catch (const chaiscript::ReturnValue &rv) {
ss.pop_scope();
retval = rv.retval;
break;
throw;
}
catch (...) {
ss.pop_scope();