fix bug: fuction 'ensure' get error needed size

This commit is contained in:
sky 2018-07-25 17:57:36 +08:00
parent 86234db095
commit 0d9f92395a

View File

@ -392,7 +392,7 @@ static unsigned char* ensure(printbuffer * const p, size_t needed)
return NULL;
}
needed += p->offset + 1;
needed += p->offset;
if (needed <= p->length)
{
return p->buffer + p->offset;