From 55418b678b801a77c7e43eec3dcf2d6c890c80d1 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sat, 24 Nov 2012 14:14:16 -0800 Subject: [PATCH] INPUT PROGRAM: Don't break out of INPUT PROGRAM on interactive error. Until now, any erroneous command typed within an input program at an interactive command prompt implicitly "broke out" of the input program, causing confusing behavior. This commit fixes the problem: commands following an erroneous command within INPUT PROGRAM continue to be part of the input program. Bug #33419. Reported by John Darrington. --- src/language/data-io/inpt-pgm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/language/data-io/inpt-pgm.c b/src/language/data-io/inpt-pgm.c index ccd53be04e..afeb832643 100644 --- a/src/language/data-io/inpt-pgm.c +++ b/src/language/data-io/inpt-pgm.c @@ -112,7 +112,9 @@ cmd_input_program (struct lexer *lexer, struct dataset *ds) emit_END_CASE (ds, inp); saw_END_CASE = true; } - else if (cmd_result_is_failure (result) && result != CMD_FAILURE) + else if (cmd_result_is_failure (result) + && result != CMD_FAILURE + && lex_get_error_mode (lexer) != LEX_ERROR_INTERACTIVE) { if (result == CMD_EOF) msg (SE, _("Unexpected end-of-file within INPUT PROGRAM.")); -- 2.30.2