From 13bcfc37f6906ee36c520612b4d3d63dc6be2c0b Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Sun, 10 Mar 2024 14:14:44 +0100 Subject: [PATCH] whoops --- lab01/zad1/src/queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lab01/zad1/src/queue.c b/lab01/zad1/src/queue.c index 3e5a7bd..19cb6b6 100644 --- a/lab01/zad1/src/queue.c +++ b/lab01/zad1/src/queue.c @@ -15,7 +15,7 @@ Queue *queue_new(size_t length, size_t element_size) { Queue *ret = malloc(sizeof(Queue)); ret->back = 0; ret->front = 0; - ret->length = length; + ret->length = length + 1; ret->element_size = element_size; ret->data = malloc((length + 1) * sizeof(void*));