Mercurial > octave
changeset 22703:d43094e91ba7 stable
Ignore continue statement when used outside of a loop (bug #48665)
* pt-eval.cc (octave::tree_evaluator::visit_continue_command): Only allow
continue statement to have an effect when used in a loop context.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Mon, 31 Oct 2016 11:40:55 -0700 |
parents | 8e71fd674bcf |
children | 413a19bca7f3 |
files | libinterp/parse-tree/pt-eval.cc |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-eval.cc Mon Oct 31 12:59:05 2016 +0100 +++ b/libinterp/parse-tree/pt-eval.cc Mon Oct 31 11:40:55 2016 -0700 @@ -115,8 +115,7 @@ if (debug_mode) do_breakpoint (cmd.is_breakpoint (true)); - if (statement_context == function || statement_context == script - || in_loop_command) + if (in_loop_command) tree_continue_command::continuing = 1; }