[Kernel] Add comment about Shadowrun bug.
[Kernel] Add comment about Shadowrun thread name bug and a bonus lint fix.
This commit is contained in:
parent
a6868d1f8a
commit
bdeae25353
|
@ -47,10 +47,13 @@ void HandleSetThreadName(pointer_t<X_EXCEPTION_RECORD> record) {
|
|||
return;
|
||||
}
|
||||
|
||||
// Shadowrun (and its demo) has a bug where it ends up passing freed memory
|
||||
// for the name, so at the point of SetThreadName it's filled with junk.
|
||||
|
||||
// TODO(gibbed): cvar for thread name encoding for conversion, some games use
|
||||
// SJIS and there's no way to automatically know this.
|
||||
auto name =
|
||||
std::string(kernel_memory()->TranslateVirtual<const char*>(thread_info->name_ptr));
|
||||
auto name = std::string(
|
||||
kernel_memory()->TranslateVirtual<const char*>(thread_info->name_ptr));
|
||||
std::replace_if(
|
||||
name.begin(), name.end(), [](auto c) { return c < 32 || c > 127; }, '?');
|
||||
|
||||
|
|
Loading…
Reference in New Issue