mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-26 23:10:38 +00:00
HLE: Log longer string args.
Sometimes was hiding useful parts of filenames, etc.
This commit is contained in:
parent
129700596f
commit
1faa4031e6
@ -794,10 +794,11 @@ size_t hleFormatLogArgs(char *message, size_t sz, const char *argmask) {
|
||||
case 's':
|
||||
if (Memory::IsValidAddress(regval)) {
|
||||
const char *s = Memory::GetCharPointer(regval);
|
||||
if (strnlen(s, 64) >= 64) {
|
||||
APPEND_FMT("%.64s...", Memory::GetCharPointer(regval));
|
||||
const int safeLen = Memory::ValidSize(regval, 128);
|
||||
if (strnlen(s, safeLen) >= safeLen) {
|
||||
APPEND_FMT("%.*s...", safeLen, Memory::GetCharPointer(regval));
|
||||
} else {
|
||||
APPEND_FMT("%s", Memory::GetCharPointer(regval));
|
||||
APPEND_FMT("%.*s", safeLen, Memory::GetCharPointer(regval));
|
||||
}
|
||||
} else {
|
||||
APPEND_FMT("(invalid)");
|
||||
|
Loading…
Reference in New Issue
Block a user