Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#533 closed Bug (Fixed)

_ArrayBinarySearch allows multi-dimension array when it shouldn't

Reported by: Triblade Owned by: Gary
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:


It's my coding mistake that I tried to use it on a two dimensional array, but it didn't return an error code, but 'crashed' back to the editor.


C:\Program Files\AutoIt3\Include\Array.au3 (102) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:
If $avArray[$iStart] > $vValue Or $avArray[$iEnd] < $vValue Then Return SetError(2, 0, -1)
->15:51:57 AutoIT3.exe ended.rc:1

It's the same error as in bug 166, but with a different array UDF.
Possible fix:

If UBound($avArray, 0) > 1 Then Return SetError(5, 0, -1)

Others I think(!) that have the same issue:
_ArrayToString (and thus: _ArrayToClip)

Attachments (0)

Change History (2)

comment:1 Changed 16 years ago by Gary

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

Fixed in version:

comment:2 Changed 16 years ago by TalivanIBM

Hey i have proved the new beta and when i use _ArraySearch can't use a 2 Dimension Array, return error 2, and when i use the function works always fine (for me) i have edit the au3 in Include Folder and set to comment the line of Ubound (the 2nd in the function) and now works in my script.

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 Gary.

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

Note: See TracTickets for help on using tickets.