do the IFS_QUOTE dance right; this finally fixes ""$@

This commit is contained in:
tg 2015-07-06 17:45:33 +00:00
parent 2e4cd72899
commit d09aca4175

15
eval.c
View File

@ -23,7 +23,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.169 2015/05/23 17:43:19 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.170 2015/07/06 17:45:33 tg Exp $");
/*
* string expansion
@ -291,21 +291,14 @@ expand(
c = *sp++;
break;
case OQUOTE:
switch (word) {
case IFS_QUOTE:
/* """something */
word = IFS_WORD;
break;
case IFS_WORD:
break;
default:
if (word != IFS_WORD)
word = IFS_QUOTE;
break;
}
tilde_ok = 0;
quote = 1;
continue;
case CQUOTE:
if (word == IFS_QUOTE)
word = IFS_WORD;
quote = st->quotew;
continue;
case COMSUB: