Mercurial > hg > nnchat
changeset 284:dbf07a4eadd7
Grave bugfix in ringbuffer implementation!
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 09 Jun 2011 22:35:12 +0300 |
parents | 18e292701db4 |
children | b765f15f9895 220d7996696a |
files | th_util.c |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/th_util.c Thu Jun 09 22:29:40 2011 +0300 +++ b/th_util.c Thu Jun 09 22:35:12 2011 +0300 @@ -439,7 +439,6 @@ buf->n++; th_free(buf->data[0]); - memmove(&(buf->data[0]), &(buf->data[1]), buf->size - 1); + memmove(&(buf->data[0]), &(buf->data[1]), (buf->size - 1) * sizeof(void *)); buf->data[buf->size - 1] = ptr; } -