From 4fab3e46c8e8ce95f59a98af37405217a6c50b17 Mon Sep 17 00:00:00 2001 From: Sacha Ayoun Date: Thu, 26 Jun 2025 14:21:36 +0100 Subject: [PATCH] fix check Signed-off-by: Sacha Ayoun --- src/cc_deque.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cc_deque.c b/src/cc_deque.c index 6d4ad5a..1415e7c 100644 --- a/src/cc_deque.c +++ b/src/cc_deque.c @@ -1209,7 +1209,7 @@ enum cc_stat cc_deque_zip_iter_add(CC_DequeZipIter *iter, void *e1, void *e2) /* While this check is performed by a call to cc_deque_add_at, it is necessary to know in advance whether both deque buffers have enough room before inserting new elements because this operation must insert either both elements, or none.*/ - if ((iter->d1->capacity == iter->d1->size && expand_capacity(iter->d1) != CC_OK) && + if ((iter->d1->capacity == iter->d1->size && expand_capacity(iter->d1) != CC_OK) || (iter->d2->capacity == iter->d2->size && expand_capacity(iter->d2) != CC_OK)) { return CC_ERR_ALLOC; }