libbb: fix thinko in latest xrealloc_vector change
This commit is contained in:
parent
e6ce824edd
commit
db29f5e73e
@ -39,7 +39,7 @@ void* FAST_FUNC xrealloc_vector_helper(void *vector, unsigned sizeof_and_shift,
|
||||
if (!(idx & (mask - 1))) {
|
||||
sizeof_and_shift >>= 8; /* sizeof(vector[0]) */
|
||||
vector = xrealloc(vector, sizeof_and_shift * (idx + mask + 1));
|
||||
vector += idx;
|
||||
vector = (char*)vector + (sizeof_and_shift * idx);
|
||||
memset(vector, 0, sizeof_and_shift * (mask + 1));
|
||||
}
|
||||
return vector;
|
||||
|
Loading…
Reference in New Issue
Block a user