From 583cfcae5d533b9c2d5643d0d4ae991c6a46fe24 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Wed, 28 Sep 2005 08:14:27 +0000 Subject: [PATCH] Fix bug 1306390. Batch labels can start with a space Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2324 --- src/shell/shell_batch.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/shell/shell_batch.cpp b/src/shell/shell_batch.cpp index d708d66b..cf957c5b 100644 --- a/src/shell/shell_batch.cpp +++ b/src/shell/shell_batch.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: shell_batch.cpp,v 1.17 2005-05-18 17:29:09 qbix79 Exp $ */ +/* $Id: shell_batch.cpp,v 1.18 2005-09-28 08:14:27 qbix79 Exp $ */ #include #include @@ -133,9 +133,10 @@ again: } } while (c!='\n' && n); *cmd_write++=0; - if (cmd[0]==':') { - char *nospace = trim(cmd+1); - if (strcasecmp(nospace,where)==0) return true; + char *nospace = trim(cmd); + if (nospace[0] == ':') { + char* nonospace = trim(nospace+1); + if (strcasecmp(nonospace,where)==0) return true; } if (!n) { delete this;