1
0
Fork 0

if is always with == except for errorlevel, which accepts = as well

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2125
This commit is contained in:
Peter Veenstra 2005-03-02 11:53:00 +00:00
parent 25e705f683
commit 9a497f0b4b

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: shell_cmds.cpp,v 1.51 2005-02-10 10:21:12 qbix79 Exp $ */
/* $Id: shell_cmds.cpp,v 1.52 2005-03-02 11:53:00 qbix79 Exp $ */
#include <string.h>
#include <ctype.h>
@ -526,9 +526,15 @@ void DOS_Shell::CMD_IF(char * args) {
bool has_not=false;
char * comp=strchr(args,'=');
if (comp) {
if (comp[1]!='=') {SyntaxError();return;}
*comp++=' ';
*comp++=' ';
if (comp[1] == '=') {
*comp++ = ' ';
*comp++ = ' ';
} else if(strncasecmp(args,"ERRORLEVEL",10) == 0) {
/* this is in general a syntax error except for errorlevel */
*comp++ = ' ';
while(*comp++ == ' ')
; /*nothing */
} else {SyntaxError();return;}
};
char * word=StripWord(args);
if (strcasecmp(word,"NOT")==0) {