spotted a missing substitute() call inside evaluate() call

incl. regression test
This commit is contained in:
tg
2009-08-28 21:35:43 +00:00
parent 1fd4515528
commit dc976e5923
2 changed files with 20 additions and 3 deletions

4
eval.c
View File

@ -22,7 +22,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.66 2009/08/28 20:30:55 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.67 2009/08/28 21:35:43 tg Exp $");
/*
* string expansion
@ -385,7 +385,7 @@ expand(const char *cp, /* input word */
&from, KSH_UNWIND_ERROR, true);
afree(stg, ATEMP);
if (end) {
evaluate(stg = wdstrip(mid, false, false),
evaluate(substitute(stg = wdstrip(mid, false, false), 0),
&num, KSH_UNWIND_ERROR, true);
afree(stg, ATEMP);
}