From c868d54def8cebd151964fdeaa8257932b8cfc39 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 24 Feb 2025 12:00:33 -0500 Subject: hexdump: give a different debug log for size==0 Signed-off-by: Peter Jones --- include/hexdump.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/hexdump.h b/include/hexdump.h index e8f4fe1a..6f3d5fa5 100644 --- a/include/hexdump.h +++ b/include/hexdump.h @@ -89,10 +89,14 @@ vhexdumpf(const char *file, int line, const char *func, const CHAR16 *const fmt, if (verbose == 0) return; - if (!data || !size) { + if (!data) { dprint(L"hexdump of a NULL pointer!\n"); return; } + if (!size) { + dprint(L"hexdump of a 0 size region!\n"); + return; + } while (offset < size) { char hexbuf[49]; -- cgit v1.2.3