invalid free fixed

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@725 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2006-11-25 14:33:00 +00:00
parent acb6590343
commit 8272138c2c
4 changed files with 10 additions and 22 deletions
+4 -5
View File
@@ -231,11 +231,10 @@ void updateworld(int curtime, int lastmillis) // main game update loop
{
loopv(sleeps)
{
scriptsleep &s = sleeps[i];
if(s.wait && lastmillis > s.wait)
{
execute(s.cmd);
delete[] s.cmd;
if(sleeps[i].wait && lastmillis > sleeps[i].wait)
{
execute(sleeps[i].cmd);
delete[] sleeps[i].cmd;
sleeps.remove(i--);
};
};