From bf9f50bc0eff2e9231c55a2bfd5f97c27e6de4dd Mon Sep 17 00:00:00 2001 From: Kahrl Date: Wed, 25 Dec 2013 00:29:00 +0100 Subject: [PATCH] Make SHA1::addBytes(..., 0) a no-op instead of an assertion failure --- src/sha1.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sha1.cpp b/src/sha1.cpp index 98180adc7..6ed7385d5 100644 --- a/src/sha1.cpp +++ b/src/sha1.cpp @@ -146,7 +146,7 @@ void SHA1::process() void SHA1::addBytes( const char* data, int num ) { assert( data ); - assert( num > 0 ); + assert( num >= 0 ); // add these bytes to the running total size += num; // repeat until all data is processed -- 2.25.1