Make checks in erase not only happen in debug mode.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3083 dfc29bdd-3216-0410-991c-e03cc46cb475
master
hybrid 2009-12-28 13:42:59 +00:00
parent 5185fdf554
commit 0be2fc2628
1 changed files with 4 additions and 1 deletions

View File

@ -547,7 +547,10 @@ public:
\param count: Amount of elements to be erased. */
void erase(u32 index, s32 count)
{
_IRR_DEBUG_BREAK_IF(index>=used || count<1 || index+count>used) // access violation
if (index>=used || count<1)
return;
if (index+count>used)
count = used-index;
u32 i;
for (i=index; i<index+count; ++i)