- added runtime checks for the state usage flags.

This commit is contained in:
Christoph Oelckers 2016-11-15 00:18:57 +01:00
commit 647e1399f1
4 changed files with 26 additions and 0 deletions

View file

@ -2437,6 +2437,7 @@ void ZCCCompiler::CompileStates()
auto sl = static_cast<ZCC_StateLine *>(st);
FState state;
memset(&state, 0, sizeof(state));
state.UseFlags = flags;
if (sl->Sprite->Len() != 4)
{
Error(sl, "Sprite name must be exactly 4 characters. Found '%s'", sl->Sprite->GetChars());