From fbb8a014d14fc8887529f344b128900dfc581a4d Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 6 Mar 2016 14:59:25 -0800 Subject: Fix in chk_manage_vec resizing from zero. * lib.c (bounding_pow_two): Eliminate bogus zero versus non-zero case check in return which causes the function to wrongly map 1 to 0, so that chk_manage_vec is then not able to adjust a vector to size 1. --- lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib.c b/lib.c index 2f8440e3..02861521 100644 --- a/lib.c +++ b/lib.c @@ -2346,7 +2346,7 @@ static size_t bounding_pow_two(size_t s) s |= (t >> 16); } - return s ? s + 1 : s; + return s + 1; } mem_t *chk_manage_vec(mem_t *old, size_t oldfilled, size_t newfilled, -- cgit v1.2.3