From 56c3a4be9ce2c4cdff03d77b4cf276a230e29b8e Mon Sep 17 00:00:00 2001 From: ripsaw8080 Date: Tue, 6 Jan 2015 18:32:47 +0000 Subject: [PATCH] Make the shell's internal run loop more like the command prompt run loop. Fixes CALLed batch files when executed in subshells, such as with Norton/Volkov Commander. Reference SourceForge bug #394. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3885 --- src/shell/shell.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/shell/shell.cpp b/src/shell/shell.cpp index 76cdd404..997c8e11 100644 --- a/src/shell/shell.cpp +++ b/src/shell/shell.cpp @@ -265,21 +265,21 @@ void DOS_Shell::ParseLine(char * line) { -void DOS_Shell::RunInternal(void) -{ +void DOS_Shell::RunInternal(void) { char input_line[CMD_MAXLINE] = {0}; - while(bf && bf->ReadLine(input_line)) - { - if (echo) { + while (bf) { + if (bf->ReadLine(input_line)) { + if (echo) { if (input_line[0] != '@') { ShowPrompt(); WriteOut_NoParsing(input_line); WriteOut_NoParsing("\n"); - }; - }; - ParseLine(input_line); + } + } + ParseLine(input_line); + if (echo) WriteOut_NoParsing("\n"); + } } - return; } void DOS_Shell::Run(void) {