From 4937406820049d6ac7e950677c8cd168deb73a6d Mon Sep 17 00:00:00 2001 From: Philip Pronin Date: Tue, 9 Dec 2014 13:43:33 -0800 Subject: [PATCH] fix Cursor::skipAtMostSlow bug introduced in D1724111 Test Plan: fbconfig -r folly/io/test && fbmake runtests_opt -j32 Reviewed By: viswanath@fb.com Subscribers: folly-diffs@ FB internal diff: D1728927 Tasks: 5788015 Signature: t1:1728927:1418161580:9ed66412e35c62486a56e19aa9bf119863b5f1a1 Blame Revision: D1724111 --- folly/io/Cursor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folly/io/Cursor.h b/folly/io/Cursor.h index 064aa34d..eecf42cf 100644 --- a/folly/io/Cursor.h +++ b/folly/io/Cursor.h @@ -441,7 +441,7 @@ class CursorBase { if (UNLIKELY(!tryAdvanceBuffer())) { return skipped; } - len -= skipped; + len -= available; } offset_ += len; return skipped + len; -- 2.34.1