Commit 0be2fc26 authored by hybrid's avatar hybrid

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
parent 5185fdf5
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment