Merge pull request #1304 from lioncash/str
svc: Do nothing in svcOutputDebugString() if given a length of zero
This commit is contained in:
commit
0821a210c4
2 changed files with 7 additions and 3 deletions
|
@ -273,7 +273,11 @@ 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
|
/// Used to output a message on a debug hardware unit - does nothing on a retail unit
|
||||||
static void OutputDebugString(VAddr address, s32 len) {
|
static void OutputDebugString(VAddr address, u64 len) {
|
||||||
|
if (len == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
std::string str(len, '\0');
|
std::string str(len, '\0');
|
||||||
Memory::ReadBlock(address, str.data(), str.size());
|
Memory::ReadBlock(address, str.data(), str.size());
|
||||||
LOG_DEBUG(Debug_Emulated, "{}", str);
|
LOG_DEBUG(Debug_Emulated, "{}", str);
|
||||||
|
|
|
@ -222,9 +222,9 @@ void SvcWrap() {
|
||||||
func((s64)PARAM(0));
|
func((s64)PARAM(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <void func(u64, s32 len)>
|
template <void func(u64, u64 len)>
|
||||||
void SvcWrap() {
|
void SvcWrap() {
|
||||||
func(PARAM(0), (s32)(PARAM(1) & 0xFFFFFFFF));
|
func(PARAM(0), PARAM(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <void func(u64, u64, u64)>
|
template <void func(u64, u64, u64)>
|
||||||
|
|
Loading…
Reference in a new issue