Modify

Opened 18 years ago

Closed 18 years ago

Last modified 17 years ago

#533 closed Bug (Fixed)

_ArrayBinarySearch allows multi-dimension array when it shouldn't

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

Description

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.

Error:

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)
If ERROR
->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:
_ArrayTrim
_ArrayToString (and thus: _ArrayToClip)
_ArrayReverse
_ArrayPop
_ArrayMinIndex
_ArrayMin
_ArrayMax
_ArrayConcatenate
_ArrayAdd

Attachments (0)

Change History (2)

comment:1 by Gary, 18 years ago

Milestone: 3.2.13.8
Owner: set to Gary
Resolution: Fixed
Status: newclosed

Fixed in version: 3.2.13.8

comment:2 by TalivanIBM, 17 years ago

Hey i have proved the new beta 3.2.13.8 and when i use _ArraySearch can't use a 2 Dimension Array, return error 2, and when i use 3.2.12.1 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.

Modify Ticket

Action
as closed The owner will remain Gary.

Add Comment


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