diff --git a/CHANGELOG.md b/CHANGELOG.md index 97198823ca..34ea5acc9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -132,6 +132,7 @@ Bug #6794: Light sources are attached to mesh bounds centers instead of mesh origins when AttachLight NiNode is missing Bug #6799: Game crashes if an NPC has no Class attached Bug #6849: ImageButton texture is not scaled properly + Bug #6895: Removing a negative number of items from a script, makes the script terminate with an error Feature #890: OpenMW-CS: Column filtering Feature #1465: "Reset" argument for AI functions Feature #2491: Ability to make OpenMW "portable" diff --git a/apps/openmw/mwscript/containerextensions.cpp b/apps/openmw/mwscript/containerextensions.cpp index bb63ec84cc..742cfb1828 100644 --- a/apps/openmw/mwscript/containerextensions.cpp +++ b/apps/openmw/mwscript/containerextensions.cpp @@ -216,7 +216,7 @@ namespace MWScript runtime.pop(); if (count<0) - throw std::runtime_error ("second argument for RemoveItem must be non-negative"); + count = static_cast(count); // no-op if (count == 0)