Commit 6c27aec2 authored by Michael Tremer's avatar Michael Tremer

hexdump: Don't try to dump any empty memory

Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent 866ae435
......@@ -66,6 +66,9 @@ static inline void hexdump(struct loc_ctx* ctx, const void* addr, size_t len) {
DEBUG(ctx, "Dumping %zu byte(s)\n", len);
if (!len)
return;
// Process every byte in the data
for (i = 0; i < len; i++) {
// Multiple of 16 means new line (with line offset)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment