mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
fix a buffer overflow (order of ops)
This commit is contained in:
parent
460c8f7f0f
commit
7e657c49f1
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue