Forráskód Böngészése

Make SHA1::addBytes(..., 0) a no-op instead of an assertion failure

Kahrl 10 éve
szülő
commit
bf9f50bc0e
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      src/sha1.cpp

+ 1 - 1
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