Skip to content

Commit

Permalink
Fix address formatting, somehow it was left-aligned
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-rifkin committed May 19, 2024
1 parent 10e7a5e commit b2fe396
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cpptrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit b2fe396

Please sign in to comment.