This code replaces the dictionary's "var" array by another one, so it must
either update "var_cap" to the allocated size or allocate "var_cap" (not
"var_cnt") elements. I chose the latter fix.
assert (count == 0 || order != NULL);
assert (count <= d->var_cnt);
- new_var = xnmalloc (d->var_cnt, sizeof *new_var);
+ new_var = xnmalloc (d->var_cap, sizeof *new_var);
memcpy (new_var, order, count * sizeof *new_var);
for (i = 0; i < count; i++)
{