Fixing memory tests
This commit is contained in:
1 parent
62c71f3fe6
commit
650645eaff
1 file changed
+3
@@ -83,6 +83,9 @@ int_t memoryCompare(
|
||||
assertNotNull(a, "Cannot compare NULL memory.");
|
||||
assertNotNull(b, "Cannot compare NULL memory.");
|
||||
assertTrue(size >= 0, "Cannot compare negative bytes of memory.");
|
||||
|
||||
if(size == 0) return 0; // Comparing 0 bytes is always equal
|
||||
|
||||
return memcmp(a, b, size);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user