diff options
author | Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> | 1990-10-15 23:06:25 +0000 |
---|---|---|
committer | Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> | 1990-10-15 23:06:25 +0000 |
commit | 39c3038ca76b338006c640ae6da52b407dd9e654 (patch) | |
tree | 2c2e20583f6b38967167e68b93c17b5381751216 /array.c | |
parent | b6ccd89c4e9e943419de0b1846c5d54324a5ed8a (diff) | |
download | perl-39c3038ca76b338006c640ae6da52b407dd9e654.tar.gz |
perl 3.0 patch #30 patch #29, continued
See patch #29.
Diffstat (limited to 'array.c')
-rw-r--r-- | array.c | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -1,4 +1,4 @@ -/* $Header: array.c,v 3.0.1.2 90/08/13 21:52:20 lwall Locked $ +/* $Header: array.c,v 3.0.1.3 90/10/15 14:56:17 lwall Locked $ * * Copyright (c) 1989, Larry Wall * @@ -6,6 +6,9 @@ * as specified in the README file that comes with the perl 3.0 kit. * * $Log: array.c,v $ + * Revision 3.0.1.3 90/10/15 14:56:17 lwall + * patch29: non-existent array values no longer cause core dumps + * * Revision 3.0.1.2 90/08/13 21:52:20 lwall * patch28: defined(@array) and defined(%array) didn't work right * @@ -38,12 +41,15 @@ int lval; return str; } else - return Nullstr; + return &str_undef; } - if (lval && !ar->ary_array[key]) { - str = Str_new(6,0); - (void)astore(ar,key,str); - return str; + if (!ar->ary_array[key]) { + if (lval) { + str = Str_new(6,0); + (void)astore(ar,key,str); + return str; + } + return &str_undef; } return ar->ary_array[key]; } |