diff options
Diffstat (limited to 'old-extension/bindarr.c')
-rw-r--r-- | old-extension/bindarr.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/old-extension/bindarr.c b/old-extension/bindarr.c index 60959903..1a0104db 100644 --- a/old-extension/bindarr.c +++ b/old-extension/bindarr.c @@ -3,22 +3,22 @@ * to array and array elements. */ -/* +/* * Copyright (C) 1986, 1988, 1989, 1991-2011 the Free Software Foundation, Inc. - * + * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. - * + * * GAWK is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. - * + * * GAWK is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -235,7 +235,7 @@ do_bind_array(int nargs) } /* copy the array -- this is passed as the second argument to the functions */ - emalloc(aname, char *, strlen(t->vname) + 2, "do_bind_array"); + emalloc(aname, char *, 1 + strlen(symbol->vname) + 1, "do_bind_array"); aname[0] = '~'; /* any illegal character */ strcpy(& aname[1], symbol->vname); td = make_array(); @@ -286,7 +286,7 @@ do_unbind_array(int nargs) *symbol = *xn; freenode(xn); - return make_number(0); + return make_number(0); } |