summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pttbbs/common/sys/vbuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pttbbs/common/sys/vbuf.c b/pttbbs/common/sys/vbuf.c
index 4e000fdd..d66ad7e5 100644
--- a/pttbbs/common/sys/vbuf.c
+++ b/pttbbs/common/sys/vbuf.c
@@ -101,7 +101,7 @@ vbuf_attach(VBUF *v, char *buf, size_t szbuf)
{
assert(szbuf > 1);
v->head = v->tail = v->buf = buf;
- v->buf_end = v->buf + v->capacity;
+ v->buf_end = v->buf + szbuf;
v->capacity = szbuf-1;
}