diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2010-07-16 14:55:10 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2010-07-16 14:55:10 +0300 |
commit | 00ef0423acd97cb964a2bae54c93a03a8ab50e5e (patch) | |
tree | 2864426773f537f912db1bd716c27b713c5f7dcf /array.c | |
parent | 3ba50a15ebd976f7a88393e2e45dc14b6478b9a9 (diff) | |
download | egawk-00ef0423acd97cb964a2bae54c93a03a8ab50e5e.tar.gz egawk-00ef0423acd97cb964a2bae54c93a03a8ab50e5e.tar.bz2 egawk-00ef0423acd97cb964a2bae54c93a03a8ab50e5e.zip |
Move to 3.1.8.
Diffstat (limited to 'array.c')
-rw-r--r-- | array.c | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2009 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2010 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -59,8 +59,8 @@ array_init() const char *val; int newval; - if ((val = getenv("AVG_CHAIN_MAX")) != NULL && ISDIGIT(*val)) { - for (newval = 0; *val && ISDIGIT(*val); val++) + if ((val = getenv("AVG_CHAIN_MAX")) != NULL && isdigit(*val)) { + for (newval = 0; *val && isdigit(*val); val++) newval = (newval * 10) + *val - '0'; AVG_CHAIN_MAX = newval; @@ -510,9 +510,8 @@ assoc_lookup(NODE *symbol, NODE *subs, int reference) } if (do_lint && reference) { - subs->stptr[subs->stlen] = '\0'; - lintwarn(_("reference to uninitialized element `%s[\"%s\"]'"), - array_vname(symbol), subs->stptr); + lintwarn(_("reference to uninitialized element `%s[\"%.*s\"]'"), + array_vname(symbol), (int)subs->stlen, subs->stptr); } /* It's not there, install it. */ |