diff options
Diffstat (limited to 'tests/perf/encperf.cxx')
-rw-r--r-- | tests/perf/encperf.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/perf/encperf.cxx b/tests/perf/encperf.cxx index 1b14151b..4665346f 100644 --- a/tests/perf/encperf.cxx +++ b/tests/perf/encperf.cxx @@ -159,8 +159,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; } |