#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 16 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
comment:2 Changed 16 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.
Fixed in version: 3.2.13.8