git-svn-id: http://svn.openzap.org/svn/openzap/trunk@366 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Anthony Minessale 2008-01-14 19:10:12 +00:00
parent 38c7ed615e
commit 8d3361d8a5
1 changed files with 1 additions and 1 deletions

View File

@ -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;