fix destroy_apk_queue as we're currently on the stak

This commit is contained in:
Adonis Najimi 2018-05-04 09:31:18 +02:00
commit bf0b91c444

View file

@ -25,11 +25,7 @@ SDL_bool apk_queue_init(struct apk_queue *queue) {
} }
void apk_queue_destroy(struct apk_queue *queue) { void apk_queue_destroy(struct apk_queue *queue) {
int i = queue->tail; // do nothing as we are on the stack
while (i != queue->head) {
SDL_free(&queue->data[i]);
i = (i + 1) % APK_QUEUE_SIZE;
}
} }
SDL_bool apk_queue_push(struct apk_queue *queue, const char *apk) { SDL_bool apk_queue_push(struct apk_queue *queue, const char *apk) {