fix bug in hexdump
This commit is contained in:
parent
3719a44998
commit
280327e98e
|
@ -88,7 +88,7 @@ u6a_hexdump(FILE* restrict output_stream, const char* data, const char* formatte
|
||||||
fprintf_check(output_stream, "%02x ", data[idx]);
|
fprintf_check(output_stream, "%02x ", data[idx]);
|
||||||
}
|
}
|
||||||
int blanks = (U6A_HEXDUMP_BYTES_PER_LINE - remaining) / 2 * 5;
|
int blanks = (U6A_HEXDUMP_BYTES_PER_LINE - remaining) / 2 * 5;
|
||||||
fprintf_check(output_stream, " %*s%s\n", blanks, "", formatted + length - remaining);
|
fprintf_check(output_stream, " %*s%.*s\n", blanks, "", remaining, formatted + length - remaining);
|
||||||
} else {
|
} else {
|
||||||
fprintf_check(output_stream, format, idx, D_INC_DUP_16, formatted + idx);
|
fprintf_check(output_stream, format, idx, D_INC_DUP_16, formatted + idx);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue