aboutsummaryrefslogtreecommitdiffstats
path: root/tests/perf/decperf.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'tests/perf/decperf.cxx')
-rw-r--r--tests/perf/decperf.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/perf/decperf.cxx b/tests/perf/decperf.cxx
index a6a50899..687ac7a9 100644
--- a/tests/perf/decperf.cxx
+++ b/tests/perf/decperf.cxx
@@ -102,8 +102,8 @@ void DummyOutStream::flush()
size_t DummyOutStream::overrun(size_t itemSize, size_t nItems)
{
flush();
- if (itemSize * nItems > (size_t)(end - ptr))
- nItems = (end - ptr) / itemSize;
+ if (itemSize * nItems > avail())
+ nItems = avail() / itemSize;
return nItems;
}