diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2011-03-03 21:29:09 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2011-03-03 21:29:09 +0200 |
commit | 9a5422582e93056b5398c8d0c566cf356248e8a3 (patch) | |
tree | 926e2fccf407da2c847179f198ab1ba15a898362 /array.c | |
parent | 1584660b0ae4f89307609573120259c781e3e986 (diff) | |
download | egawk-9a5422582e93056b5398c8d0c566cf356248e8a3.tar.gz egawk-9a5422582e93056b5398c8d0c566cf356248e8a3.tar.bz2 egawk-9a5422582e93056b5398c8d0c566cf356248e8a3.zip |
Fixes for asort, asorti, split, patsplit.
Diffstat (limited to 'array.c')
-rw-r--r-- | array.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1239,7 +1239,6 @@ asort_actual(int nargs, ASORT_TYPE how) _("asort: second argument not an array") : _("asorti: second argument not an array")); } - assoc_clear(dest); } array = POP_PARAM(); @@ -1249,7 +1248,8 @@ asort_actual(int nargs, ASORT_TYPE how) _("asorti: first argument not an array")); } - if (dest != NULL) { + if (dest != NULL && dest != array) { + assoc_clear(dest); dup_table(array, dest); array = dest; } |