aboutsummaryrefslogtreecommitdiffstats
path: root/common/rdr/RandomStream.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'common/rdr/RandomStream.cxx')
-rw-r--r--common/rdr/RandomStream.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/rdr/RandomStream.cxx b/common/rdr/RandomStream.cxx
index 1be9b251..0290c24d 100644
--- a/common/rdr/RandomStream.cxx
+++ b/common/rdr/RandomStream.cxx
@@ -127,7 +127,7 @@ size_t RandomStream::overrun(size_t itemSize, size_t nItems, bool wait) {
}
size_t nAvail;
- nAvail = (end - ptr) / itemSize;
+ nAvail = avail() / itemSize;
if (nAvail < nItems)
return nAvail;