- fixed clearing of actorinfo.

It overwrote memory beyond its end.
This commit is contained in:
Christoph Oelckers 2020-10-14 17:04:09 +02:00
parent e4af4f28ce
commit 91fdf160b6
2 changed files with 1 additions and 18 deletions

View file

@ -1036,13 +1036,6 @@ public:
next = nextspritestat[next]; next = nextspritestat[next];
return n; return n;
} }
spritetype *Next()
{
int n = next;
next = nextspritestat[next];
return n < 0? nullptr : &sprite[n];
}
}; };
class SectIterator class SectIterator
@ -1067,13 +1060,6 @@ public:
next = nextspritesect[next]; next = nextspritesect[next];
return n; return n;
} }
spritetype *Next()
{
int n = next;
next = nextspritestat[next];
return n < 0? nullptr : &sprite[n];
}
}; };
#endif // build_h_ #endif // build_h_

View file

@ -3146,10 +3146,7 @@ void ConCompiler::setmusic()
void loadcons() void loadcons()
{ {
for (int i = 0; i < MAXTILES; i++) memset(&actorinfo, 0, sizeof(actorinfo));
{
memset(&actorinfo[i], 0, sizeof(actorinfo));
}
ScriptCode.Clear(); ScriptCode.Clear();
labels.Clear(); labels.Clear();