From f56fdefb31663c47753e61f3a3accb49d700cb8e Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Mon, 30 Nov 2009 14:53:00 +0000 Subject: [PATCH] report typed entry for %0 not the parsed entry.(System Shock reported by ripsaw) Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3507 --- include/shell.h | 2 +- src/shell/shell_batch.cpp | 6 +++--- src/shell/shell_misc.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/shell.h b/include/shell.h index b6799bee..7bce84df 100644 --- a/include/shell.h +++ b/include/shell.h @@ -44,7 +44,7 @@ class DOS_Shell; class BatchFile { public: - BatchFile(DOS_Shell * host,char const* const name, char const * const cmd_line); + BatchFile(DOS_Shell * host,char const* const resolved_name,char const* const entered_name, char const * const cmd_line); virtual ~BatchFile(); virtual bool ReadLine(char * line); bool Goto(char * where); diff --git a/src/shell/shell_batch.cpp b/src/shell/shell_batch.cpp index 3d4c1668..821d188f 100644 --- a/src/shell/shell_batch.cpp +++ b/src/shell/shell_batch.cpp @@ -24,14 +24,14 @@ #include "shell.h" #include "support.h" -BatchFile::BatchFile(DOS_Shell * host,char const * const name, char const * const cmd_line) { +BatchFile::BatchFile(DOS_Shell * host,char const * const resolved_name,char const * const entered_name, char const * const cmd_line) { location = 0; prev=host->bf; echo=host->echo; shell=host; char totalname[DOS_PATHLENGTH+4]; - DOS_Canonicalize(name,totalname); // Get fullname including drive specificiation - cmd = new CommandLine(totalname,cmd_line); + DOS_Canonicalize(resolved_name,totalname); // Get fullname including drive specificiation + cmd = new CommandLine(entered_name,cmd_line); filename = totalname; //Test if file is openable diff --git a/src/shell/shell_misc.cpp b/src/shell/shell_misc.cpp index 0f51905f..2b5056af 100644 --- a/src/shell/shell_misc.cpp +++ b/src/shell/shell_misc.cpp @@ -431,7 +431,7 @@ bool DOS_Shell::Execute(char * name,char * args) { /* delete old batch file if call is not active*/ bool temp_echo=echo; /*keep the current echostate (as delete bf might change it )*/ if(bf && !call) delete bf; - bf=new BatchFile(this,fullname,line); + bf=new BatchFile(this,fullname,name,line); echo=temp_echo; //restore it. } else