Skip to content

Commit 3920f28

Browse files
authored
Merge pull request #178 from giltho/zip-iter-add-test
Fix zip_iter_add check
2 parents 932ca3d + 4fab3e4 commit 3920f28

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/cc_deque.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1209,7 +1209,7 @@ enum cc_stat cc_deque_zip_iter_add(CC_DequeZipIter *iter, void *e1, void *e2)
12091209
/* While this check is performed by a call to cc_deque_add_at, it is necessary to know
12101210
in advance whether both deque buffers have enough room before inserting new elements
12111211
because this operation must insert either both elements, or none.*/
1212-
if ((iter->d1->capacity == iter->d1->size && expand_capacity(iter->d1) != CC_OK) &&
1212+
if ((iter->d1->capacity == iter->d1->size && expand_capacity(iter->d1) != CC_OK) ||
12131213
(iter->d2->capacity == iter->d2->size && expand_capacity(iter->d2) != CC_OK)) {
12141214
return CC_ERR_ALLOC;
12151215
}

0 commit comments

Comments
 (0)