1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-03-03 09:19:41 +00:00

Throw an exception if placeAt is passed an invalid direction parameter

This commit is contained in:
scrawl 2016-06-02 21:19:02 +02:00
parent 2ce1da688f
commit ab2089bbf3

View file

@ -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");