Mercurial > pidgin.yaz
diff libpurple/circbuffer.c @ 26851:6bc0e4e76207
merge of '9df36977fc8f70d1b3124d32a54eb123df50aa0f'
and 'f92d95c83baba97463f923077688ba2eb144763b'
author | Peter Hjalmarsson <xake@rymdraket.net> |
---|---|
date | Fri, 01 May 2009 21:36:29 +0000 |
parents | bcbc5994d21c |
children | 01f1929d0936 |
line wrap: on
line diff
--- a/libpurple/circbuffer.c Mon Mar 16 21:44:22 2009 +0000 +++ b/libpurple/circbuffer.c Fri May 01 21:36:29 2009 +0000 @@ -68,7 +68,8 @@ /* If the fill pointer is wrapped to before the remove * pointer, we need to shift the data */ - if (in_offset < out_offset) { + if (in_offset < out_offset + || (in_offset == out_offset && buf->bufused > 0)) { int shift_n = MIN(buf->buflen - start_buflen, in_offset); memcpy(buf->buffer + start_buflen, buf->buffer,