summaryrefslogtreecommitdiff
path: root/rng.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rng.cpp')
-rw-r--r--rng.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/rng.cpp b/rng.cpp
index fb52a2b..9866cd8 100644
--- a/rng.cpp
+++ b/rng.cpp
@@ -108,7 +108,7 @@ void X917RNG::GenerateIntoBufferedTransformation(BufferedTransformation &target,
throw SelfTestFailure("X917RNG: Continuous random number generator test failed.");
// output random bytes
- size_t len = UnsignedMin(size, S);
+ size_t len = UnsignedMin(S, size);
target.ChannelPut(channel, randseed, len);
size -= len;