aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/utils/data_src.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/utils/data_src.cpp b/src/lib/utils/data_src.cpp
index 4e0725943..b79f83d40 100644
--- a/src/lib/utils/data_src.cpp
+++ b/src/lib/utils/data_src.cpp
@@ -41,6 +41,7 @@ size_t DataSource::discard_next(size_t n)
{
const size_t got = this->read(buf, std::min(n, sizeof(buf)));
discarded += got;
+ n -= got;
if(got == 0)
break;