1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-30 13:15:32 +00:00

limit argument error workaround to PositionCell instruction (Fixes #1732)

This commit is contained in:
Marc Zinnschlag 2014-08-24 10:17:15 +02:00
parent 80d39780ae
commit 736ab76f68

View file

@ -1,6 +1,8 @@
#include "lineparser.hpp"
#include <memory>
#include <components/misc/stringops.hpp>
#include "scanner.hpp"
@ -297,7 +299,12 @@ namespace Compiler
try
{
ErrorDowngrade errorDowngrade (getErrorHandler());
// workaround for broken positioncell instructions.
/// \todo add option to disable this
std::auto_ptr<ErrorDowngrade> errorDowngrade (0);
if (Misc::StringUtils::lowerCase (loc.mLiteral)=="positioncell")
errorDowngrade.reset (new ErrorDowngrade (getErrorHandler()));
std::vector<Interpreter::Type_Code> code;
optionals = mExprParser.parseArguments (argumentType, scanner, code);
mCode.insert (mCode.begin(), code.begin(), code.end());