From d91d1c6d6376ba3a56bcf17205e05b2634a0b865 Mon Sep 17 00:00:00 2001 From: stewartamiles Date: Fri, 14 Aug 2009 16:15:48 +0000 Subject: [PATCH] Fixed memory_not_equal_display_error() to display an error if memory blocks are the same. git-svn-id: http://cmockery.googlecode.com/svn/trunk@41 40f4469a-5155-0410-be90-2de3f0bae501 --- src/cmockery.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cmockery.c b/src/cmockery.c index 5c51b57..e7ad3b1 100755 --- a/src/cmockery.c +++ b/src/cmockery.c @@ -868,11 +868,10 @@ static int memory_not_equal_display_error( const char l = a[i]; const char r = b[i]; if (l == r) { - print_error("equal at offset %d 0x%02x 0x%02x\n", i, l, r); same ++; } } - if (same) { + if (same == size) { print_error("%d bytes of 0x%08x and 0x%08x the same\n", same, a, b); return 0; -- 2.34.1