changeset 18392:ed1e63425f79

Error out of dbtype when start or end line number <= 0. * debug.cc (do_dbtype): Issue error message and then break out of case statement to end of function.
author Rik <rik@octave.org>
date Sat, 25 Jan 2014 16:15:13 -0800
parents 5b7b12e16523
children 6a2cc29f55fc
files libinterp/corefcn/debug.cc
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/debug.cc	Sat Jan 25 01:38:15 2014 -0800
+++ b/libinterp/corefcn/debug.cc	Sat Jan 25 16:15:13 2014 -0800
@@ -1007,7 +1007,10 @@
                       end = atoi (end_str.c_str ());
 
                     if (std::min (start, end) <= 0)
-                      error ("dbtype: start and end lines must be >= 1\n");
+                      {
+                        error ("dbtype: start and end lines must be >= 1\n");
+                        break;
+                      }
 
                     if (start <= end)
                       do_dbtype (octave_stdout, dbg_fcn->fcn_file_name (),