ksh/ksh-20120801-unset-param.patch
2017-03-03 17:32:33 +01:00

18 lines
536 B
Diff

diff -up ksh-20120801/src/cmd/ksh93/sh/macro.c.bz1222025 ksh-20120801/src/cmd/ksh93/sh/macro.c
--- ksh-20120801/src/cmd/ksh93/sh/macro.c.bz1222025 2015-09-15 17:28:47.304722569 +0200
+++ ksh-20120801/src/cmd/ksh93/sh/macro.c 2015-09-17 17:49:46.842891942 +0200
@@ -1195,6 +1195,13 @@ retry1:
}
else
v = 0;
+ if(!v && sh_isoption(SH_NOUNSET))
+ {
+ d=fcget();
+ fcseek(-1);
+ if(!(d && strchr(":+-?=",d)))
+ errormsg(SH_DICT,ERROR_exit(1),e_notset,ltos(c));
+ }
break;
case S_ALP:
if(c=='.' && type==0)