From 13a521e6980ff586d720a710d44b0192ba6b5fa6 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sat, 9 Jul 2011 03:22:03 +0200 Subject: [PATCH] Fix off-by-one error in assertion. Fixes test/simple/test-http-buffer-sanity.js --- src/tcp_wrap.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tcp_wrap.cc b/src/tcp_wrap.cc index 50b584adc8e..db2b8d1741c 100644 --- a/src/tcp_wrap.cc +++ b/src/tcp_wrap.cc @@ -292,7 +292,7 @@ class TCPWrap { Local slab_obj = slab_v->ToObject(); slab = Buffer::Data(slab_obj); assert(Buffer::Length(slab_obj) == SLAB_SIZE); - assert(SLAB_SIZE > slab_used); + assert(SLAB_SIZE >= slab_used); // If less than 64kb is remaining on the slab allocate a new one. if (SLAB_SIZE - slab_used < 64 * 1024) {