mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-17 10:49:47 +00:00
fix iobuf shrink to less than current len
This commit is contained in:
1 parent
2c5a6d4df6
commit
d55fb80746
3 files changed
+4
No files matched your search
@@ -322,6 +322,8 @@ static void test_iobuf(void) {
|
||||
mg_iobuf_add(&io, io.len, "a", 1);
|
||||
ASSERT(io.buf != NULL && io.size == 20 && io.len == 11);
|
||||
ASSERT(memcmp(io.buf, "xhi!123456a", io.len) == 0);
|
||||
mg_iobuf_resize(&io, 1);
|
||||
ASSERT(io.buf != NULL && io.size == 10 && io.len == 10);
|
||||
mg_iobuf_free(&io);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user