On Thu, Dec 15, 2022 at 08:16:46PM -0800, Ray Andrews wrote: > > On 2022-12-15 19:21, Lawrence Velázquez wrote: > > Or before. > Exactly the case here.  This code has many global variables and ... well, no > need to say more. > > Wrong. It assumed that "main" contained the expected data and > > nothing extra. I've already asked you to use "typeset -p" to verify > > its actual contents, but you still haven't. > > No need, zeroing the array solves the issue. Mind, I suppose I could do a > forensic on that, and figure out when and where the corruption occurs The issue is not solved. You still have something that adds the bogus values before the reinitialisation. Whether this has some adverse effects depends on the scripts. (Sample script attached). Basically you probably do ~ this: init_main # ... main=($main) <-- Creates extra values # ... init_main printf "%-20s %s\n" ${(kv)main} This is a bug in your scripts and not in zsh. > and then, of course I'll use typeset -p Forget about the typeset, look for "main=$(main)" or similar. Ciao Dominik ^_^ ^_^ -- Dominik Vogt