forked from mirror/openmw-tes3mp
Throw an exception if placeAt is passed an invalid direction parameter
This commit is contained in:
parent
2ce1da688f
commit
ab2089bbf3
1 changed files with 3 additions and 0 deletions
|
@ -508,6 +508,9 @@ namespace MWScript
|
|||
Interpreter::Type_Integer direction = runtime[0].mInteger;
|
||||
runtime.pop();
|
||||
|
||||
if (direction < 0 || direction > 3)
|
||||
throw std::runtime_error ("invalid direction");
|
||||
|
||||
if (count<0)
|
||||
throw std::runtime_error ("count must be non-negative");
|
||||
|
||||
|
|
Loading…
Reference in a new issue