diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/buf_es.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/buf_es.cpp b/src/buf_es.cpp index 409a98297..b0ae98865 100644 --- a/src/buf_es.cpp +++ b/src/buf_es.cpp @@ -36,6 +36,7 @@ u32bit Buffered_EntropySource::fast_poll(byte out[], u32bit length) u32bit Buffered_EntropySource::slow_poll(byte out[], u32bit length) { do_slow_poll(); + done_slow_poll = true; return copy_out(out, length, buffer.size()); } @@ -53,6 +54,7 @@ void Buffered_EntropySource::do_fast_poll() void Buffered_EntropySource::add_bytes(const void* entropy_ptr, u32bit length) { const byte* bytes = static_cast<const byte*>(entropy_ptr); + while(length) { u32bit copied = std::min(length, buffer.size() - write_pos); |