mirror of
https://github.com/open-goal/jak-project
synced 2026-07-12 07:38:53 -04:00
Fix cases of string formatting with non string literals (#3304)
The logger used in `goalc` tries to print an already-formatted string
`message` using `fmt::print(message);` Usually this doesn't cause
problems, but if you try to print, for example, an exception that has
special characters (notably `{`) it will try to do another round of
formatting/replacements, despite not having any args to replace with,
which ends up throwing another exception. This is why errors when
parsing custom level JSON cause the REPL to exit.
I've hopefully identified all the various instances of this across the
codebase
This commit is contained in:
@@ -224,7 +224,7 @@ InstructionPointerInfo Debugger::get_rip_info(u64 rip) {
|
||||
|
||||
void print_and_append_to_string(std::string& str, const std::string& log) {
|
||||
str += log;
|
||||
lg::print(log);
|
||||
lg::print("{}", log);
|
||||
}
|
||||
|
||||
std::vector<BacktraceFrame> Debugger::get_backtrace(u64 rip,
|
||||
|
||||
Reference in New Issue
Block a user