This commit is contained in:
Akash Mozumdar 2019-05-31 14:29:56 -04:00
parent 23a6b116cd
commit 6975145db9

View File

@ -327,7 +327,7 @@ int TextHook::HookStrlen(BYTE* data)
{
BYTE* orig = data;
int nulls = hp.null_length ? hp.null_length : hp.type & USING_UNICODE ? 2 : 1;
for (int nullsRemaining = nulls; nullsRemaining >= 0; ++data)
for (int nullsRemaining = nulls; nullsRemaining > 0; ++data)
if (*data == 0) nullsRemaining -= 1;
else nullsRemaining = nulls;
return data - orig;