Modify

Opened 11 years ago

Closed 11 years ago

Last modified 11 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 Changed 11 years ago by Gary

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

Fixed in version: 3.2.13.8

comment:2 Changed 11 years ago by TalivanIBM

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.

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

Action
as closed The owner will remain Gary.
Author


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

 
Note: See TracTickets for help on using tickets.