Fix address formatting, somehow it was left-aligned

This commit is contained in:
Jeremy 2024-05-19 16:28:41 -05:00
parent 10e7a5e442
commit b2fe396d70
No known key found for this signature in database
GPG Key ID: 19AA8270105E8EB4

View File

@ -108,7 +108,7 @@ namespace cpptrace {
if(is_inline) {
str += microfmt::format("{<{}}", 2 * sizeof(frame_ptr) + 2, "(inlined)");
} else {
str += microfmt::format("0x{<{}:0h}", 2 * sizeof(frame_ptr), raw_address);
str += microfmt::format("0x{>{}:0h}", 2 * sizeof(frame_ptr), raw_address);
}
if(!symbol.empty()) {
str += microfmt::format(" in {}", symbol);
@ -166,7 +166,7 @@ namespace cpptrace {
if(frame.is_inline) {
line += microfmt::format("{<{}}", 2 * sizeof(frame_ptr) + 2, "(inlined)");
} else {
line += microfmt::format("{}0x{<{}:0h}{}", blue, 2 * sizeof(frame_ptr), frame.raw_address, reset);
line += microfmt::format("{}0x{>{}:0h}{}", blue, 2 * sizeof(frame_ptr), frame.object_address, reset);
}
if(!frame.symbol.empty()) {
line += microfmt::format(" in {}{}{}", yellow, frame.symbol, reset);