mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2024-11-22 03:19:24 +01:00
Don't allocate more than needed
This commit is contained in:
parent
b7c9a8c4df
commit
3272171245
@ -34,7 +34,7 @@ int TimerController::arm(TimeoutHandler *which, int ms)
|
||||
{
|
||||
this->n_handlers++;
|
||||
this->handlers = (TimeoutHandler**)xrealloc(this->handlers,
|
||||
(this->n_handlers + 1) * sizeof(TimeoutHandler*));
|
||||
this->n_handlers * sizeof(TimeoutHandler*));
|
||||
}
|
||||
this->handlers[i] = which;
|
||||
which->timer_id = i;
|
||||
|
Loading…
Reference in New Issue
Block a user