aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKahrl <kahrl@gmx.net>2013-12-25 00:29:00 +0100
committerKahrl <kahrl@gmx.net>2013-12-25 00:29:00 +0100
commitbf9f50bc0eff2e9231c55a2bfd5f97c27e6de4dd (patch)
tree4c97e024261f1243747684afd3de712744e8ba70
parent3aa28bc7a2014dcefd9f24517ff32223bec32a35 (diff)
downloadminetest-bf9f50bc0eff2e9231c55a2bfd5f97c27e6de4dd.tar.gz
minetest-bf9f50bc0eff2e9231c55a2bfd5f97c27e6de4dd.tar.bz2
minetest-bf9f50bc0eff2e9231c55a2bfd5f97c27e6de4dd.zip
Make SHA1::addBytes(..., 0) a no-op instead of an assertion failure
-rw-r--r--src/sha1.cpp2
1 files changed, 1 insertions, 1 deletions
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