From c041f140715850e7d1d5cb6f252f9ad7afd792d8 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Thu, 9 May 2013 14:07:04 +0000 Subject: [PATCH] Fix bug 391 by relaxing the SET /P check. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3829 --- src/shell/shell_cmds.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/shell/shell_cmds.cpp b/src/shell/shell_cmds.cpp index 661c6b5c..cb398e65 100644 --- a/src/shell/shell_cmds.cpp +++ b/src/shell/shell_cmds.cpp @@ -742,8 +742,6 @@ void DOS_Shell::CMD_COPY(char * args) { void DOS_Shell::CMD_SET(char * args) { HELP("SET"); - if (ScanCMDBool(args,"P")) - E_Exit("Set /P is not supported. Use Choice!"); StripSpaces(args); std::string line; if (!*args) { @@ -754,6 +752,11 @@ void DOS_Shell::CMD_SET(char * args) { } return; } + //There are args: + char * pcheck = args; + while ( *pcheck && (*pcheck == ' ' || *pcheck == '\t')) pcheck++; + if (*pcheck && strlen(pcheck) >3 && (strncasecmp(pcheck,"/p ",3) == 0)) E_Exit("Set /P is not supported. Use Choice!"); + char * p=strpbrk(args, "="); if (!p) { if (!GetEnvStr(args,line)) WriteOut(MSG_Get("SHELL_CMD_SET_NOT_SET"),args);