diff options
| author | 2018-09-12 12:10:14 -0400 | |
|---|---|---|
| committer | 2018-09-12 12:10:14 -0400 | |
| commit | 0821a210c431125d6eacb0d8b25ada9ca0537ca0 (patch) | |
| tree | bb176298af5e47c8646db94f784ec636064e90b9 /src/core/hle/kernel/svc.cpp | |
| parent | Merge pull request #1305 from FreddyFunk/cmake_yuzu_as_vs_startup_project (diff) | |
| parent | svc: Do nothing if svcOutputDebugString() is given a length of zero (diff) | |
| download | yuzu-0821a210c431125d6eacb0d8b25ada9ca0537ca0.tar.gz yuzu-0821a210c431125d6eacb0d8b25ada9ca0537ca0.tar.xz yuzu-0821a210c431125d6eacb0d8b25ada9ca0537ca0.zip | |
Merge pull request #1304 from lioncash/str
svc: Do nothing in svcOutputDebugString() if given a length of zero
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
| -rw-r--r-- | src/core/hle/kernel/svc.cpp | 6 |
1 files changed, 5 insertions, 1 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) { | |||
| 273 | } | 273 | } |
| 274 | 274 | ||
| 275 | /// Used to output a message on a debug hardware unit - does nothing on a retail unit | 275 | /// Used to output a message on a debug hardware unit - does nothing on a retail unit |
| 276 | static void OutputDebugString(VAddr address, s32 len) { | 276 | static void OutputDebugString(VAddr address, u64 len) { |
| 277 | if (len == 0) { | ||
| 278 | return; | ||
| 279 | } | ||
| 280 | |||
| 277 | std::string str(len, '\0'); | 281 | std::string str(len, '\0'); |
| 278 | Memory::ReadBlock(address, str.data(), str.size()); | 282 | Memory::ReadBlock(address, str.data(), str.size()); |
| 279 | LOG_DEBUG(Debug_Emulated, "{}", str); | 283 | LOG_DEBUG(Debug_Emulated, "{}", str); |