diff --git a/src/cmd/ksh93/sh/init.c b/src/cmd/ksh93/sh/init.c index 4d29ed3b8835..b24920923853 100644 --- a/src/cmd/ksh93/sh/init.c +++ b/src/cmd/ksh93/sh/init.c @@ -830,7 +830,7 @@ void sh_setmatch(const char *v, int vsize, int nmatch, int match[], int index) free(ap); SH_MATCHNOD->nvalue = NULL; SH_MATCHNOD->nvfun = NULL; - if(!(mp->nmatch=nmatch) && !v) + if(!(mp->nmatch=nmatch) || !v) { sh.subshell = savesub; return;