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

fixed parsing of end statements in scripts with IDs matching keywords

This commit is contained in:
Marc Zinnschlag 2013-04-27 14:06:23 +02:00
parent ade871ce12
commit 90b38cbfbe

View file

@ -71,6 +71,19 @@ namespace Compiler
return true;
}
if (mState==EndNameState)
{
// optional repeated name after end statement
if (mName!=loc.mLiteral)
reportWarning ("Names for script " + mName + " do not match", loc);
mState = EndCompleteState;
return false; // we are stopping here, because there might be more garbage on the end line,
// that we must ignore.
//
/// \todo allow this workaround to be disabled for newer scripts
}
return Parser::parseKeyword (keyword, loc, scanner);
}