This commit is contained in:
Richard Holland
2023-10-19 12:18:29 +00:00
parent adf30fb819
commit 96cf8f089d

View File

@@ -1157,21 +1157,22 @@ DEFINE_HOOK_FUNCTION(
if (read_len > 128)
read_len = 128;
while (read_len > 0)
if (read_len > 0)
{
// skip \0 if present at the end
if (*((const char*)memory + read_ptr + read_len - 1) == '\0')
read_len--;
if (read_len == 0)
break;
if (read_len > 0)
{
j.trace()
<< "HookTrace[" << HC_ACC() << "]: "
<< std::string_view((const char*)memory + read_ptr, read_len)
<< ": " << number;
j.trace()
<< "HookTrace[" << HC_ACC() << "]: "
<< std::string_view((const char*)memory + read_ptr, read_len)
<< ": " << number;
return 0;
return 0;
}
}
j.trace()