changeset 18937:fc43c8017e9b

Fix infinite loop when using builtin ("keyboard") (bug #33296). * toplev.cc (octave_call_stack::do_goto_frame_relative): If call stack increment is 0 (not dbup, nor dbdown, but keyboard function), choose an increment of -1 to eventially break out of while (1) loop.
author Rik <rik@octave.org>
date Thu, 15 May 2014 08:16:53 -0700
parents 5f37573a6868
children 6d14aa793e0a dff05c124017
files libinterp/corefcn/toplev.cc
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/toplev.cc
+++ b/libinterp/corefcn/toplev.cc
@@ -446,6 +446,8 @@
               break;
             }
         }
+      else if (incr == 0)  // Break out of infinite loop by choosing an incr. 
+        incr = -1;
 
       // There is no need to set scope and context here.  That will
       // happen when the dbup/dbdown/keyboard frame is popped and we