|
if (b->first + newsize > b->capacity) |
|
buffer_reserve(b, (newsize * 3) / 2); |
should be:
if (!b->first || b->first + newsize > b->capacity)
I know it's annoying, because it sort of is super-correct if you just ignore the fact that it is defined as undefined behaviour.
tinystl/include/TINYSTL/buffer.h
Lines 206 to 207 in c51bc42
should be:
if (!b->first || b->first + newsize > b->capacity)I know it's annoying, because it sort of is super-correct if you just ignore the fact that it is defined as undefined behaviour.