From d09aca4175bf73db859360c44e3ed3502d07e844 Mon Sep 17 00:00:00 2001 From: tg Date: Mon, 6 Jul 2015 17:45:33 +0000 Subject: [PATCH] do the IFS_QUOTE dance right; this finally fixes ""$@ --- eval.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/eval.c b/eval.c index fbcb61d..0b585bc 100644 --- a/eval.c +++ b/eval.c @@ -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: