Opened 13 years ago
Closed 12 years ago
#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 , 12 years ago
follow-up: 4 comment:3 by , 12 years ago
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
comment:4 by , 12 years ago
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 , 12 years ago
| Milestone: | → 3.3.13.13 |
|---|---|
| Owner: | set to |
| Resolution: | → Fixed |
| Status: | new → closed |
Fixed by revision [10513] in version: 3.3.13.13

For reference, revision 7126 broke this.