From 650645eaff411a1b73bf62887919170559e8496b Mon Sep 17 00:00:00 2001 From: Dominic Masters Date: Mon, 13 Apr 2026 22:42:39 -0500 Subject: [PATCH] Fixing memory tests --- src/dusk/util/memory.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/dusk/util/memory.c b/src/dusk/util/memory.c index ff69eb79..e6e90fa0 100644 --- a/src/dusk/util/memory.c +++ b/src/dusk/util/memory.c @@ -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); }