summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cbuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cbuf.c b/src/cbuf.c
index 20d505d..2baad37 100644
--- a/src/cbuf.c
+++ b/src/cbuf.c
@@ -164,7 +164,7 @@ cbuf_write(struct cbuf *cbuf, size_t index, const void *buf, size_t size)
end = start + size;
buf_end = cbuf->buf + cbuf->capacity;
- if ((end <= cbuf->buf) || (end > buf_end)) {
+ if ((end < cbuf->buf) || (end > buf_end)) {
skip = buf_end - start;
memcpy(start, buf, skip);
buf += skip;