summaryrefslogtreecommitdiffstats
path: root/src/core/templates.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-04-26 23:54:48 +0200
committeraap <aap@papnet.eu>2020-04-26 23:54:48 +0200
commita069aa57dba36603b44ae282765fd8352ddd3a3d (patch)
treec487cfb3053bced222fda2fa1fcf45cb501f5242 /src/core/templates.h
parentlibrw update (diff)
parentMerge pull request #489 from Nick007J/master (diff)
downloadre3-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 'src/core/templates.h')
-rw-r--r--src/core/templates.h4
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;
}