summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-09-12 18:10:14 +0200
committerGitHub <noreply@github.com>2018-09-12 18:10:14 +0200
commit0821a210c431125d6eacb0d8b25ada9ca0537ca0 (patch)
treebb176298af5e47c8646db94f784ec636064e90b9
parentMerge pull request #1305 from FreddyFunk/cmake_yuzu_as_vs_startup_project (diff)
parentsvc: Do nothing if svcOutputDebugString() is given a length of zero (diff)
downloadyuzu-0821a210c431125d6eacb0d8b25ada9ca0537ca0.tar
yuzu-0821a210c431125d6eacb0d8b25ada9ca0537ca0.tar.gz
yuzu-0821a210c431125d6eacb0d8b25ada9ca0537ca0.tar.bz2
yuzu-0821a210c431125d6eacb0d8b25ada9ca0537ca0.tar.lz
yuzu-0821a210c431125d6eacb0d8b25ada9ca0537ca0.tar.xz
yuzu-0821a210c431125d6eacb0d8b25ada9ca0537ca0.tar.zst
yuzu-0821a210c431125d6eacb0d8b25ada9ca0537ca0.zip
-rw-r--r--src/core/hle/kernel/svc.cpp6
-rw-r--r--src/core/hle/kernel/svc_wrap.h4
2 files changed, 7 insertions, 3 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 1c9373ed8..0b2a7e3cb 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -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
-static void OutputDebugString(VAddr address, s32 len) {
+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);
diff --git a/src/core/hle/kernel/svc_wrap.h b/src/core/hle/kernel/svc_wrap.h
index 79c3fe31b..1eda5f879 100644
--- a/src/core/hle/kernel/svc_wrap.h
+++ b/src/core/hle/kernel/svc_wrap.h
@@ -222,9 +222,9 @@ void SvcWrap() {
func((s64)PARAM(0));
}
-template <void func(u64, s32 len)>
+template <void func(u64, u64 len)>
void SvcWrap() {
- func(PARAM(0), (s32)(PARAM(1) & 0xFFFFFFFF));
+ func(PARAM(0), PARAM(1));
}
template <void func(u64, u64, u64)>