mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-12-25 08:55:38 +00:00
svc: Do nothing if svcOutputDebugString() is given a length of zero
While unlikely, it does avoid constructing a std::string and unnecessarily calling into the memory code if a game or executable decides to be really silly about their logging.
This commit is contained in:
parent
04d723baf9
commit
9b3bc0b282
|
@ -274,6 +274,10 @@ static void Break(u64 reason, u64 info1, u64 info2) {
|
|||
|
||||
/// Used to output a message on a debug hardware unit - does nothing on a retail unit
|
||||
static void OutputDebugString(VAddr address, u64 len) {
|
||||
if (len == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
std::string str(len, '\0');
|
||||
Memory::ReadBlock(address, str.data(), str.size());
|
||||
LOG_DEBUG(Debug_Emulated, "{}", str);
|
||||
|
|
Loading…
Reference in a new issue