mirror of
https://github.com/GTAmodding/re3.git
synced 2025-07-16 17:34:08 +00:00
Fixes
This commit is contained in:
parent
c8c9413ef5
commit
8a745e4d89
5 changed files with 56 additions and 24 deletions
|
@ -61,12 +61,21 @@ public:
|
|||
T *New(void){
|
||||
bool wrapped = false;
|
||||
do
|
||||
#ifdef FIX_BUGS
|
||||
if (++m_allocPtr >= m_size) {
|
||||
m_allocPtr = 0;
|
||||
if (wrapped)
|
||||
return nil;
|
||||
wrapped = true;
|
||||
}
|
||||
#else
|
||||
if(++m_allocPtr == m_size){
|
||||
if(wrapped)
|
||||
return nil;
|
||||
wrapped = true;
|
||||
m_allocPtr = 0;
|
||||
}
|
||||
#endif
|
||||
while(!m_flags[m_allocPtr].free);
|
||||
m_flags[m_allocPtr].free = 0;
|
||||
m_flags[m_allocPtr].id++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue