From a6b2124fd5cba5d6a8213528d0e72c7becd10885 Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Wed, 1 Oct 2025 17:06:39 -0300 Subject: [PATCH] fix for non-64-bit test platforms --- test/unit_test.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/unit_test.c b/test/unit_test.c index 493a28ae..111fa02f 100644 --- a/test/unit_test.c +++ b/test/unit_test.c @@ -2268,11 +2268,12 @@ static void test_str(void) { { // mg_queue_printf() struct mg_queue q; char buf[128]; + uint32_t p = 0xffffffff; + size_t len; mg_queue_init(&q, buf, sizeof(buf)); - void *p = (void *) 0xffffffffffffffff; - size_t len = mg_queue_printf(&q, "A%p%p%pB", p, p, p); - ASSERT(len == 56); - ASSERT(memcmp(buf + 4, "A0xffffffffffffffff0xffffffffffffffff0xffffffffffffffffB", 56) == 0); + len = mg_queue_printf(&q, "A%p%p%pB", p, p, p); + ASSERT(len == 32); + ASSERT(memcmp(buf + 4, "A0xffffffff0xffffffff0xffffffffB", 32) == 0); } // Non-standard formatting