From a04b59d38e412af1d2860283f6c61e9acbd9c3f6 Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Fri, 15 Jan 2021 12:04:30 +0100 Subject: [PATCH] Fix debugging format strings and remove bogus int cast This was found while debugging #1726; -:D would print "heap resized to 0 bytes" when the max heap size was set to 4096M. --- runtime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime.c b/runtime.c index 157ae59f..51cfa7be 100644 --- a/runtime.c +++ b/runtime.c @@ -1269,7 +1269,7 @@ void C_set_or_change_heap_size(C_word heap, int reintern) if(fromspace_start && heap_size >= heap) return; if(debug_mode) - C_dbg(C_text("debug"), C_text("heap resized to %d bytes\n"), (int)heap); + C_dbg(C_text("debug"), C_text("heap resized to " UWORD_COUNT_FORMAT_STRING " bytes\n"), heap); heap_size = heap; @@ -1306,7 +1306,7 @@ void C_do_resize_stack(C_word stack) if(diff != 0 && !stack_size_changed) { if(debug_mode) - C_dbg(C_text("debug"), C_text("stack resized to %d bytes\n"), (int)stack); + C_dbg(C_text("debug"), C_text("stack resized to " UWORD_COUNT_FORMAT_STRING " bytes\n"), stack); stack_size = stack; -- 2.20.1