fix vstrchr like use of cstrchr
This commit is contained in:
parent
257021e510
commit
b89c144344
4
eval.c
4
eval.c
@ -22,7 +22,7 @@
|
||||
|
||||
#include "sh.h"
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.105 2011/06/12 14:45:33 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.106 2011/07/02 17:57:02 tg Exp $");
|
||||
|
||||
/*
|
||||
* string expansion
|
||||
@ -1181,7 +1181,7 @@ varsub(Expand *xp, const char *sp, const char *word,
|
||||
if (*sp == '!' && sp[1]) {
|
||||
++sp;
|
||||
xp->var = global(sp);
|
||||
if (cstrchr(sp, '[')) {
|
||||
if (vstrchr(sp, '[')) {
|
||||
if (xp->var->flag & ISSET)
|
||||
xp->str = shf_smprintf("%lu",
|
||||
arrayindex(xp->var));
|
||||
|
Loading…
x
Reference in New Issue
Block a user