fix a buffer overflow (order of ops)

This commit is contained in:
Bill Currie 2003-05-16 19:36:03 +00:00
parent 460c8f7f0f
commit 7e657c49f1

View file

@ -155,7 +155,7 @@ view_remove (view_t *par, view_t *view)
if (par->children[i] == view) {
memcpy (par->children + i, par->children + i + 1,
(par->num_children - i - 1) * sizeof (view_t *));
par->children [par->num_children--] = 0;
par->children [--par->num_children] = 0;
break;
}
}