- Added type coercion for action function parameters.

- I add PARAMI, and then I don't even do it right...

SVN r1919 (scripting)
This commit is contained in:
Randy Heit 2009-10-15 22:15:55 +00:00
commit 3cbac657d6
4 changed files with 18 additions and 3 deletions

View file

@ -365,7 +365,7 @@ FxExpression *FxParameter::Resolve(FCompileContext& ctx)
static void EmitConstantInt(VMFunctionBuilder *build, int val)
{
// If it fits in 24 bits, use PARAMI instead of PARAM.
if ((val << 8) >> 8)
if (((val << 8) >> 8) == val)
{
build->Emit(OP_PARAMI, val);
}