mirror of
https://github.com/libretro/RetroArch.git
synced 2025-03-06 00:48:10 +00:00
Check size of queue before pushing.
This commit is contained in:
parent
b0c70231db
commit
aaabc3601b
@ -71,6 +71,9 @@ void msg_queue_free(msg_queue_t *queue)
|
||||
|
||||
void msg_queue_push(msg_queue_t *queue, const char *msg, unsigned prio, unsigned duration)
|
||||
{
|
||||
if (queue->ptr >= queue->size)
|
||||
return;
|
||||
|
||||
struct queue_elem *new_elem = calloc(1, sizeof(struct queue_elem));
|
||||
new_elem->prio = prio;
|
||||
new_elem->duration = duration;
|
||||
|
Loading…
x
Reference in New Issue
Block a user