# HG changeset patch # User Matti Hamalainen # Date 1307648112 -10800 # Node ID dbf07a4eadd7a6e8a942d464ab2b7d0c5c11b0aa # Parent 18e292701db46a3805104578ca1b44579a5c7b5c Grave bugfix in ringbuffer implementation! diff -r 18e292701db4 -r dbf07a4eadd7 th_util.c --- 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; } -