mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-01-03 15:20:27 +01:00
[Logs] Fix ptr to char array formatting
This commit is contained in:
parent
985ba2d6fb
commit
98d3e30a22
|
|
@ -53,6 +53,18 @@ template <std::size_t N> struct log_class_string<const char[N]> {
|
|||
}
|
||||
};
|
||||
|
||||
template <std::size_t N> struct log_class_string<char (*)[N]> {
|
||||
static void format(std::string &out, const void *arg) {
|
||||
log_class_string<char *, void>::format_n(out, *(char **)arg, N);
|
||||
}
|
||||
};
|
||||
|
||||
template <std::size_t N> struct log_class_string<const char (*)[N]> {
|
||||
static void format(std::string &out, const void *arg) {
|
||||
log_class_string<char *, void>::format_n(out, *(char **)arg, N);
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct log_class_string<char8_t *, void> : log_class_string<char *> {};
|
||||
|
||||
|
|
|
|||
|
|
@ -297,7 +297,7 @@ orbis::SysResult orbis::sys_osem_cancel(Thread *thread /* TODO */) {
|
|||
orbis::SysResult orbis::sys_namedobj_create(Thread *thread,
|
||||
ptr<const char[32]> name,
|
||||
ptr<void> object, uint16_t type) {
|
||||
ORBIS_LOG_NOTICE(__FUNCTION__, *name, object, type);
|
||||
ORBIS_LOG_NOTICE(__FUNCTION__, name, object, type);
|
||||
char _name[32];
|
||||
if (auto result = ureadString(_name, sizeof(_name), (const char *)name);
|
||||
result != ErrorCode{}) {
|
||||
|
|
@ -305,7 +305,7 @@ orbis::SysResult orbis::sys_namedobj_create(Thread *thread,
|
|||
}
|
||||
if (type < 0x101 || type > 0x104) {
|
||||
if (type != 0x107)
|
||||
ORBIS_LOG_ERROR(__FUNCTION__, *name, object, type);
|
||||
ORBIS_LOG_ERROR(__FUNCTION__, name, object, type);
|
||||
}
|
||||
|
||||
std::lock_guard lock(thread->tproc->namedObjMutex);
|
||||
|
|
|
|||
Loading…
Reference in a new issue