From 30fc3117387cae18679c29c28eed9fdaa1b70069 Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Sun, 22 Apr 2018 15:56:40 +0200 Subject: [PATCH] Fix linux build --- DynamicHooks/conventions/x86MsCdecl.cpp | 2 +- DynamicHooks/conventions/x86MsStdcall.cpp | 2 +- DynamicHooks/conventions/x86MsThiscall.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DynamicHooks/conventions/x86MsCdecl.cpp b/DynamicHooks/conventions/x86MsCdecl.cpp index 38724dd..1136d08 100644 --- a/DynamicHooks/conventions/x86MsCdecl.cpp +++ b/DynamicHooks/conventions/x86MsCdecl.cpp @@ -129,7 +129,7 @@ int x86MsCdecl::GetArgRegisterSize() void* x86MsCdecl::GetArgumentPtr(unsigned int iIndex, CRegisters* pRegisters) { - if (iIndex < 0 || iIndex >= m_vecArgTypes.length()) + if (iIndex >= m_vecArgTypes.length()) return NULL; // Check if this argument was passed in a register. diff --git a/DynamicHooks/conventions/x86MsStdcall.cpp b/DynamicHooks/conventions/x86MsStdcall.cpp index 795325a..62651f7 100644 --- a/DynamicHooks/conventions/x86MsStdcall.cpp +++ b/DynamicHooks/conventions/x86MsStdcall.cpp @@ -137,7 +137,7 @@ int x86MsStdcall::GetArgRegisterSize() void* x86MsStdcall::GetArgumentPtr(unsigned int iIndex, CRegisters* pRegisters) { - if (iIndex < 0 || iIndex >= m_vecArgTypes.length()) + if (iIndex >= m_vecArgTypes.length()) return NULL; // Check if this argument was passed in a register. diff --git a/DynamicHooks/conventions/x86MsThiscall.cpp b/DynamicHooks/conventions/x86MsThiscall.cpp index 36389d0..c09b6e6 100644 --- a/DynamicHooks/conventions/x86MsThiscall.cpp +++ b/DynamicHooks/conventions/x86MsThiscall.cpp @@ -154,7 +154,7 @@ void* x86MsThiscall::GetArgumentPtr(unsigned int iIndex, CRegisters* pRegisters) // The this pointer isn't explicitly defined as an argument. iIndex--; - if (iIndex < 0 || iIndex >= m_vecArgTypes.length()) + if (iIndex >= m_vecArgTypes.length()) return NULL; // Check if this argument was passed in a register.