diff options
author | aap <aap@papnet.eu> | 2020-04-26 23:54:48 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-04-26 23:54:48 +0200 |
commit | a069aa57dba36603b44ae282765fd8352ddd3a3d (patch) | |
tree | c487cfb3053bced222fda2fa1fcf45cb501f5242 /src/core/templates.h | |
parent | librw update (diff) | |
parent | Merge pull request #489 from Nick007J/master (diff) | |
download | re3-a069aa57dba36603b44ae282765fd8352ddd3a3d.tar re3-a069aa57dba36603b44ae282765fd8352ddd3a3d.tar.gz re3-a069aa57dba36603b44ae282765fd8352ddd3a3d.tar.bz2 re3-a069aa57dba36603b44ae282765fd8352ddd3a3d.tar.lz re3-a069aa57dba36603b44ae282765fd8352ddd3a3d.tar.xz re3-a069aa57dba36603b44ae282765fd8352ddd3a3d.tar.zst re3-a069aa57dba36603b44ae282765fd8352ddd3a3d.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/templates.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/templates.h b/src/core/templates.h index a1627357..51a24e4c 100644 --- a/src/core/templates.h +++ b/src/core/templates.h @@ -104,6 +104,10 @@ public: return m_flags[i].free ? nil : (T*)&m_entries[i]; } T *GetAt(int handle){ +#ifdef FIX_BUGS + if (handle == -1) + return nil; +#endif return m_flags[handle>>8].u == (handle & 0xFF) ? (T*)&m_entries[handle >> 8] : nil; } |