Skip to content

Commit

Permalink
Fixed internal Dehacked support
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-lysiuk committed Apr 22, 2017
1 parent e4c73cf commit 173fa31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/d_dehacked.cpp
Expand Up @@ -2844,7 +2844,7 @@ static bool LoadDehSupp ()

sc.MustGetStringName(",");
sc.MustGetNumber();
if (s.State == NULL || !actortype->OwnsState(s.State + sc.Number))
if (s.State == NULL || sc.Number < 1 || !actortype->OwnsState(s.State + sc.Number - 1))
{
sc.ScriptError("Invalid state range in '%s'", type->TypeName.GetChars());
}
Expand Down

0 comments on commit 173fa31

Please sign in to comment.