avoid SEGV on out-of-range $foo. ok by brad
This commit is contained in:
parent
f98d6bc7fb
commit
2aa73744f0
17
shells/tcsh/patches/patch-sh.dol.c
Normal file
17
shells/tcsh/patches/patch-sh.dol.c
Normal file
@ -0,0 +1,17 @@
|
||||
$OpenBSD: patch-sh.dol.c,v 1.4 2002/02/01 03:06:53 itojun Exp $
|
||||
|
||||
--- sh.dol.c- Fri Feb 1 11:58:13 2002
|
||||
+++ sh.dol.c Fri Feb 1 11:58:28 2002
|
||||
@@ -585,10 +585,8 @@
|
||||
c = DgetC(0);
|
||||
} while (Isdigit(c));
|
||||
unDredc(c);
|
||||
- if (subscr < 0) {
|
||||
- dolerror(vp->v_name);
|
||||
- return;
|
||||
- }
|
||||
+ if (subscr < 0)
|
||||
+ stderror(ERR_RANGE);
|
||||
if (subscr == 0) {
|
||||
if (bitset) {
|
||||
dolp = dolzero ? STR1 : STR0;
|
Loading…
x
Reference in New Issue
Block a user