Modify

#2364 closed Bug (Fixed)

Call with CallArgArray regression in beta

Reported by: J-Paul Mesnage Owned by: Jon
Milestone: 3.3.13.13 Component: AutoIt
Version: 3.3.9.9 Severity: None
Keywords: Cc:

Description

I found the following script does nt behave the same

Dim $args[1]
$args[0] = "CallArgArray"
$n = Call("Test1", $args)
MsgBox(262144,'Debug line ~' & @ScriptLineNumber,'Selection:' & @lf & '$n' & @lf & @lf & 'Return:' & @lf & $n & @lf & @lf & '@Error:' & @lf & @Error & @lf & @lf & '@Extended:' & @lf & @Extended) ;### Debug MSGBOX

Func Test1()
	Return 1
EndFunc

Attachments (0)

Change History (5)

comment:1 by Jon, on Jul 28, 2014 at 3:37:03 PM

For reference, revision 7126 broke this.

comment:2 by J-Paul Mesnage, on Jul 28, 2014 at 4:55:08 PM

one more ...

comment:3 by Jon, on Jul 28, 2014 at 5:59:01 PM

Actually, this is a change from 3.3.8.1 but it seems to be ok behaviour as I would expect it.

$args[0] contains "CallArgArray" which signifies that it will pass some additional parameters but doesn't declare any, but the function declaration doesn't accept any parameters so this triggers the error.

The fact that 3.3.8.1 didn't error on that because CallArgArray was missing the actual parameters, and now it does is not a problem for me.

It's also exceptionally hard to change the behaviour with the way that Call() was rewritten

in reply to:  3 comment:4 by anonymous, on Jul 29, 2014 at 12:38:22 AM

What should I do if a script I'm using doesn't know how many arguments it should pass to Call and simply prepends a "CallArgArray"? Should I rewrite every function with an empty argument list to Func name ($bugFix = Default)?

comment:5 by Jon, on Jul 29, 2014 at 4:12:33 PM

Milestone: 3.3.13.13
Owner: set to Jon
Resolution: Fixed
Status: newclosed

Fixed by revision [10513] in version: 3.3.13.13

Modify Ticket

Action
as closed The owner will remain Jon.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.