aboutsummaryrefslogtreecommitdiffstats
path: root/src/buf_es.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2007-10-19 11:56:54 +0000
committerlloyd <[email protected]>2007-10-19 11:56:54 +0000
commit403369f7d8c41fad22a694a6e7a9a42f8292d9c7 (patch)
treeeae007838548accba9af40d328dc2fbba81e3dfb /src/buf_es.cpp
parent2f92c34e3938641f7cc3e553953d676d2e95ea2d (diff)
parentd1ad07ba94372ba16ecba6d674338a554107b308 (diff)
merge of '7abb64699f9d0ffd4305b8c5686ce581f68c01ed'
and 'dda7bbd71591790326178cc71409a956cf121d6b'
Diffstat (limited to 'src/buf_es.cpp')
-rw-r--r--src/buf_es.cpp2
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);