don't parse redirection when in quotes
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2380
This commit is contained in:
parent
0797de3e25
commit
1b9f9c0169
1 changed files with 10 additions and 1 deletions
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: shell.cpp,v 1.63 2005-09-29 08:48:39 qbix79 Exp $ */
|
||||
/* $Id: shell.cpp,v 1.64 2005-11-20 20:15:16 qbix79 Exp $ */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
@ -116,9 +116,18 @@ Bitu DOS_Shell::GetRedirection(char *s, char **ifn, char **ofn,bool * append) {
|
|||
char * lw=s;
|
||||
char ch;
|
||||
Bitu num=0;
|
||||
bool quote = false;
|
||||
|
||||
while ( (ch=*lr++) ) {
|
||||
if(quote) { /* don't parse redirection within quotes. Not perfect yet. Escaped quotes will mess the count up */
|
||||
*lw++ = ch;
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (ch) {
|
||||
case '"':
|
||||
quote = !quote;
|
||||
break;
|
||||
case '>':
|
||||
*append=((*lr)=='>');
|
||||
if (*append) lr++;
|
||||
|
|
Loading…
Add table
Reference in a new issue