diff --git a/include/QF/sizebuf.h b/include/QF/sizebuf.h index a6fc39411..5e0e9a93c 100644 --- a/include/QF/sizebuf.h +++ b/include/QF/sizebuf.h @@ -44,7 +44,7 @@ typedef struct sizebuf_s int cursize; } sizebuf_t; -void SZ_Alloc (sizebuf_t *buf, int startsize); +void SZ_Alloc (sizebuf_t *buf, int maxsize); void SZ_Free (sizebuf_t *buf); void SZ_Clear (sizebuf_t *buf); void *SZ_GetSpace (sizebuf_t *buf, int length); diff --git a/libs/util/sizebuf.c b/libs/util/sizebuf.c index 785287d0c..f7d433110 100644 --- a/libs/util/sizebuf.c +++ b/libs/util/sizebuf.c @@ -41,12 +41,12 @@ VISIBLE void -SZ_Alloc (sizebuf_t *buf, int startsize) +SZ_Alloc (sizebuf_t *buf, int maxsize) { - if (startsize < 256) - startsize = 256; - buf->data = Hunk_AllocName (startsize, "sizebuf"); - buf->maxsize = startsize; + if (maxsize < 256) + maxsize = 256; + buf->data = Hunk_AllocName (maxsize, "sizebuf"); + buf->maxsize = maxsize; buf->cursize = 0; }