update
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@366 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
parent
38c7ed615e
commit
8d3361d8a5
|
@ -187,7 +187,7 @@ zap_size_t zap_buffer_write(zap_buffer_t *buffer, const void *data, zap_size_t d
|
|||
}
|
||||
|
||||
actual_freespace = buffer->datalen - buffer->actually_used;
|
||||
if (actual_freespace < datalen && (!buffer->max_len || (buffer->datalen + datalen <= buffer->max_len))) {
|
||||
if (actual_freespace < datalen && (!buffer->max_len || (buffer->used + datalen <= buffer->max_len))) {
|
||||
memmove(buffer->data, buffer->head, buffer->used);
|
||||
buffer->head = buffer->data;
|
||||
buffer->actually_used = buffer->used;
|
||||
|
|
Loading…
Reference in New Issue