mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 01:59:52 -06:00
HLE: Prevent GetStringVA to strip newlines
This commit is contained in:
@ -33,6 +33,11 @@ void HLE_OSPanic()
|
|||||||
std::string error = GetStringVA();
|
std::string error = GetStringVA();
|
||||||
std::string msg = GetStringVA(5);
|
std::string msg = GetStringVA(5);
|
||||||
|
|
||||||
|
if (!error.empty() && error.back() == '\n')
|
||||||
|
error.pop_back();
|
||||||
|
if (!msg.empty() && msg.back() == '\n')
|
||||||
|
msg.pop_back();
|
||||||
|
|
||||||
PanicAlert("OSPanic: %s: %s", error.c_str(), msg.c_str());
|
PanicAlert("OSPanic: %s: %s", error.c_str(), msg.c_str());
|
||||||
ERROR_LOG(OSREPORT, "%08x->%08x| OSPanic: %s: %s", LR, PC, error.c_str(), msg.c_str());
|
ERROR_LOG(OSREPORT, "%08x->%08x| OSPanic: %s: %s", LR, PC, error.c_str(), msg.c_str());
|
||||||
|
|
||||||
@ -72,6 +77,9 @@ void HLE_GeneralDebugPrint(ParameterType parameter_type)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!report_message.empty() && report_message.back() == '\n')
|
||||||
|
report_message.pop_back();
|
||||||
|
|
||||||
NPC = LR;
|
NPC = LR;
|
||||||
|
|
||||||
NOTICE_LOG(OSREPORT, "%08x->%08x| %s", LR, PC, SHIFTJISToUTF8(report_message).c_str());
|
NOTICE_LOG(OSREPORT, "%08x->%08x| %s", LR, PC, SHIFTJISToUTF8(report_message).c_str());
|
||||||
@ -108,6 +116,9 @@ void HLE_write_console()
|
|||||||
ERROR_LOG(OSREPORT, "__write_console uses an unreachable size pointer");
|
ERROR_LOG(OSREPORT, "__write_console uses an unreachable size pointer");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!report_message.empty() && report_message.back() == '\n')
|
||||||
|
report_message.pop_back();
|
||||||
|
|
||||||
NPC = LR;
|
NPC = LR;
|
||||||
|
|
||||||
NOTICE_LOG(OSREPORT, "%08x->%08x| %s", LR, PC, SHIFTJISToUTF8(report_message).c_str());
|
NOTICE_LOG(OSREPORT, "%08x->%08x| %s", LR, PC, SHIFTJISToUTF8(report_message).c_str());
|
||||||
@ -251,9 +262,6 @@ std::string GetStringVA(u32 str_reg, ParameterType parameter_type)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!result.empty() && result.back() == '\n')
|
|
||||||
result.pop_back();
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user