mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Allow garbage integer argument for addSpell (Fixes #1539)
This commit is contained in:
parent
320ab1b2c1
commit
750d8b5589
3 changed files with 14 additions and 10 deletions
|
@ -775,7 +775,7 @@ namespace Compiler
|
|||
{
|
||||
parser.reset();
|
||||
|
||||
if (optional)
|
||||
if (optional || *iter == 'X')
|
||||
parser.setOptional (true);
|
||||
|
||||
scanner.scan (parser);
|
||||
|
@ -783,17 +783,20 @@ namespace Compiler
|
|||
if (optional && parser.isEmpty())
|
||||
break;
|
||||
|
||||
std::vector<Interpreter::Type_Code> tmp;
|
||||
if (*iter != 'X')
|
||||
{
|
||||
std::vector<Interpreter::Type_Code> tmp;
|
||||
|
||||
char type = parser.append (tmp);
|
||||
char type = parser.append (tmp);
|
||||
|
||||
if (type!=*iter)
|
||||
Generator::convert (tmp, type, *iter);
|
||||
if (type!=*iter)
|
||||
Generator::convert (tmp, type, *iter);
|
||||
|
||||
stack.push (tmp);
|
||||
stack.push (tmp);
|
||||
|
||||
if (optional)
|
||||
++optionalCount;
|
||||
if (optional)
|
||||
++optionalCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue