Skip to content

Commit

Permalink
Stringify chars as char literals by default, rather than int literals
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-rifkin committed Dec 7, 2023
1 parent fa3b509 commit f273faf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/assert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ namespace libassert::detail {
}

LIBASSERT_ATTR_COLD std::string stringify(char value) {
return stringify((int)value);
return escape_string({&value, 1}, '\'');
}

LIBASSERT_ATTR_COLD std::string stringify(bool value) {
Expand Down

0 comments on commit f273faf

Please sign in to comment.