浏览代码

fixbug: HVLBuf::pop_front

hewei.it 4 年之前
父节点
当前提交
f87f76cd09
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      base/hbuf.h

+ 1 - 1
base/hbuf.h

@@ -142,7 +142,7 @@ public:
                 memcpy(ptr, data(), len);
             }
             _offset += len;
-            if (_offset >= len) _offset = 0;
+            if (_offset >= this->len) _offset = 0;
             _size   -= len;
         }
     }