Fix overflow of one element in deque _remove
This commit is contained in:
1 parent
92fa4691d1
commit
1d7e93251c
1 file changed
+1
-1
@@ -720,7 +720,7 @@
|
|||||||
M_CALL_FREE(oplist, n); \
|
M_CALL_FREE(oplist, n); \
|
||||||
} else { \
|
} else { \
|
||||||
memmove(&n->data[it->index], &n->data[it->index+1], \
|
memmove(&n->data[it->index], &n->data[it->index+1], \
|
||||||
sizeof(type) * (it->node->size - it->index)); \
|
sizeof(type) * (it->node->size - it->index - 1)); \
|
||||||
/* We lose capacity of the node... */ \
|
/* We lose capacity of the node... */ \
|
||||||
n->size --; \
|
n->size --; \
|
||||||
/* The iterator points to the next element \
|
/* The iterator points to the next element \
|
||||||
|
|||||||
Reference in new issue
Block a user