From: Kahrl Date: Tue, 24 Dec 2013 23:29:00 +0000 (+0100) Subject: Make SHA1::addBytes(..., 0) a no-op instead of an assertion failure X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=bf9f50bc0eff2e9231c55a2bfd5f97c27e6de4dd;p=zefram%2Fminetest%2Fminetest_engine.git Make SHA1::addBytes(..., 0) a no-op instead of an assertion failure --- diff --git a/src/sha1.cpp b/src/sha1.cpp index 98180adc..6ed7385d 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