Fixing memory tests

This commit is contained in:
2026-04-13 22:42:39 -05:00
parent 62c71f3fe6
commit 650645eaff
+3
View File
@@ -83,6 +83,9 @@ int_t memoryCompare(
assertNotNull(a, "Cannot compare NULL memory."); assertNotNull(a, "Cannot compare NULL memory.");
assertNotNull(b, "Cannot compare NULL memory."); assertNotNull(b, "Cannot compare NULL memory.");
assertTrue(size >= 0, "Cannot compare negative bytes of 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); return memcmp(a, b, size);
} }