Opened 10 years ago

Closed 9 years ago

#2364 closed Bug (Fixed)

Call with CallArgArray regression in beta

Reported by: Jpm Owned by: Jon
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:


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

Attachments (0)

Change History (5)

comment:1 Changed 9 years ago by Jon

For reference, revision 7126 broke this.

comment:2 Changed 9 years ago by Jpm

one more ...

comment:3 follow-up: Changed 9 years ago by Jon

Actually, this is a change from 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 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

comment:4 in reply to: ↑ 3 Changed 9 years ago by anonymous

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 Changed 9 years ago by Jon

  • Milestone set to
  • Owner set to Jon
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [10513] in version:

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The owner will remain Jon.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.