mirror of
https://github.com/GTAmodding/re3.git
synced 2025-07-04 16:14:09 +00:00
Fix build without FIX_BUGS, divide to 0 fixes
This commit is contained in:
parent
5d4917a5d7
commit
542a5393ac
6 changed files with 54 additions and 14 deletions
|
@ -111,14 +111,14 @@ wchar*
|
|||
CText::Get(const char *key)
|
||||
{
|
||||
uint8 result = false;
|
||||
#ifdef FIX_BUGS
|
||||
#if defined (FIX_BUGS) || defined(FIX_BUGS_64)
|
||||
wchar *outstr = keyArray.Search(key, data.chars, &result);
|
||||
#else
|
||||
wchar *outstr = keyArray.Search(key, &result);
|
||||
#endif
|
||||
|
||||
if (!result && bHasMissionTextOffsets && bIsMissionTextLoaded)
|
||||
#ifdef FIX_BUGS
|
||||
#if defined (FIX_BUGS) || defined(FIX_BUGS_64)
|
||||
outstr = mission_keyArray.Search(key, mission_data.chars, &result);
|
||||
#else
|
||||
outstr = mission_keyArray.Search(key, &result);
|
||||
|
@ -340,7 +340,7 @@ CKeyArray::Unload(void)
|
|||
void
|
||||
CKeyArray::Update(wchar *chars)
|
||||
{
|
||||
#ifndef FIX_BUGS
|
||||
#if !defined(FIX_BUGS) && !defined(FIX_BUGS_64)
|
||||
int i;
|
||||
for(i = 0; i < numEntries; i++)
|
||||
entries[i].value = (wchar*)((uint8*)chars + (uintptr)entries[i].value);
|
||||
|
@ -368,7 +368,7 @@ CKeyArray::BinarySearch(const char *key, CKeyEntry *entries, int16 low, int16 hi
|
|||
}
|
||||
|
||||
wchar*
|
||||
#ifdef FIX_BUGS
|
||||
#if defined (FIX_BUGS) || defined(FIX_BUGS_64)
|
||||
CKeyArray::Search(const char *key, wchar *data, uint8 *result)
|
||||
#else
|
||||
CKeyArray::Search(const char *key, uint8 *result)
|
||||
|
@ -378,7 +378,7 @@ CKeyArray::Search(const char *key, uint8 *result)
|
|||
char errstr[25];
|
||||
int i;
|
||||
|
||||
#ifdef FIX_BUGS
|
||||
#if defined (FIX_BUGS) || defined(FIX_BUGS_64)
|
||||
found = BinarySearch(key, entries, 0, numEntries-1);
|
||||
if (found) {
|
||||
*result = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue