[SHIMLIB] Fix gcc8 build crashing when using shims

This commit is contained in:
Mark Jansen 2020-04-07 20:47:47 +02:00
parent 167fa2c26a
commit 6db3d88984
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B

View file

@ -100,7 +100,7 @@ BOOL ShimLib_StrAEqualsWNC(PCSTR szString, PCWSTR wszString)
#endif
_SHMALLOC(".shm") SHIMREG _shim_start = { 0 };
_SHMALLOC(".shm$AAA") SHIMREG _shim_start = { 0 };
_SHMALLOC(".shm$ZZZ") SHIMREG _shim_end = { 0 };
@ -112,7 +112,7 @@ PHOOKAPI WINAPI ShimLib_GetHookAPIs(IN LPCSTR szCommandLine, IN LPCWSTR wszShimN
{
PSHIMREG ps = &_shim_start;
ps++;
for (; ps != &_shim_end; ps++)
for (; ps < &_shim_end; ps++)
{
if (ps->GetHookAPIs != NULL && ps->ShimName != NULL)
{