Skip to content

Commit 13a521e

Browse files
committed
Fix off-by-one error in assertion.
Fixes test/simple/test-http-buffer-sanity.js
1 parent dcf6955 commit 13a521e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/tcp_wrap.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ class TCPWrap {
292292
Local<Object> slab_obj = slab_v->ToObject();
293293
slab = Buffer::Data(slab_obj);
294294
assert(Buffer::Length(slab_obj) == SLAB_SIZE);
295-
assert(SLAB_SIZE > slab_used);
295+
assert(SLAB_SIZE >= slab_used);
296296

297297
// If less than 64kb is remaining on the slab allocate a new one.
298298
if (SLAB_SIZE - slab_used < 64 * 1024) {

0 commit comments

Comments
 (0)