mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Use safe_string when printing %s with Memory::GetCharPointer.
This commit is contained in:
parent
3b7a33ddd8
commit
0b3fdf0cef
@ -55,6 +55,10 @@ void truncate_cpy(char *dest, size_t destSize, const char *src) {
|
||||
}
|
||||
}
|
||||
|
||||
const char* safe_string(const char* s) {
|
||||
return s ? s : "(null)";
|
||||
}
|
||||
|
||||
long parseHexLong(std::string s) {
|
||||
long value = 0;
|
||||
|
||||
|
@ -84,6 +84,8 @@ inline void truncate_cpy(char(&out)[Count], const char *src) {
|
||||
truncate_cpy(out, Count, src);
|
||||
}
|
||||
|
||||
const char* safe_string(const char* s);
|
||||
|
||||
long parseHexLong(std::string s);
|
||||
long parseLong(std::string s);
|
||||
std::string StringFromFormat(const char* format, ...);
|
||||
|
@ -80,7 +80,7 @@ static int sceNpMatching2Term()
|
||||
|
||||
static int sceNpMatching2CreateContext(u32 communicationIdPtr, u32 passPhrasePtr, u32 ctxIdPtr, int unknown)
|
||||
{
|
||||
ERROR_LOG(SCENET, "UNIMPL %s(%08x[%s], %08x[%08x], %08x[%hu], %i) at %08x", __FUNCTION__, communicationIdPtr, Memory::GetCharPointer(communicationIdPtr), passPhrasePtr, Memory::Read_U32(passPhrasePtr), ctxIdPtr, Memory::Read_U16(ctxIdPtr), unknown, currentMIPS->pc);
|
||||
ERROR_LOG(SCENET, "UNIMPL %s(%08x[%s], %08x[%08x], %08x[%hu], %i) at %08x", __FUNCTION__, communicationIdPtr, safe_string(Memory::GetCharPointer(communicationIdPtr)), passPhrasePtr, Memory::Read_U32(passPhrasePtr), ctxIdPtr, Memory::Read_U16(ctxIdPtr), unknown, currentMIPS->pc);
|
||||
if (!npMatching2Inited)
|
||||
return hleLogError(SCENET, SCE_NP_MATCHING2_ERROR_NOT_INITIALIZED);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user