From 0a5f47ab1b279ae70999bcc34b322475791573cd Mon Sep 17 00:00:00 2001 From: Silent Date: Thu, 30 Nov 2017 18:24:53 +0100 Subject: [PATCH] Changed code so more likely scenario is in 'if' and not 'else' --- SilentPatch/TheFLAUtils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SilentPatch/TheFLAUtils.h b/SilentPatch/TheFLAUtils.h index b60bfed..c3c46b5 100644 --- a/SilentPatch/TheFLAUtils.h +++ b/SilentPatch/TheFLAUtils.h @@ -61,13 +61,13 @@ private: static int32_t GetExtendedID8_Stock(const uint8_t* ptr) { const uint8_t uID = *ptr; - return uID == MAX_UINT8_ID ? -1 : uID; + return uID != MAX_UINT8_ID ? uID : -1; } static int32_t GetExtendedID16_Stock(const uint16_t* ptr) { const uint16_t uID = *ptr; - return uID > MAX_UINT16_ID ? *reinterpret_cast(ptr) : uID; + return uID <= MAX_UINT16_ID ? uID : *reinterpret_cast(ptr); } static int32_t (*GetExtendedID8Func)(const uint8_t* ptr);