NVSE icon indicating copy to clipboard operation
NVSE copied to clipboard

Functions can have junk extra args passed

Open Demorome opened this issue 10 months ago • 0 comments

Since this seems like a doozy to fix rn, I'm keeping this issue tracked for later.

Issue is: Inside vanilla (non-eval) if-checks, you can pass as many args as you want to a function and it'll compile in a messed up state, crashing the script. Probably a vanilla bug.

However, a probably separate instance of the same bug happens inside inline expressions, though when compiling it luckily ignore the extra args and behaves fine otherwise. Still, it should probably warn users they're passing too many args there.

ExpressionParser::ParseArgs probably mishandles it for inline expressions (?). Code's a bit dense and recursive though.

Here's a script file with all the test cases I've written, commented-out text won't compile. TestPassingExtraArgBug.txt

Demorome avatar Aug 12 '23 01:08 Demorome