Modify

Opened 14 years ago

Closed 14 years ago

Last modified 5 years ago

#2170 closed Bug (Fixed)

_ArrayDisplay fails handling arrays with no elements

Reported by: ripdad Owned by: guinness
Milestone: 3.3.9.3 Component: Standard UDFs
Version: 3.3.8.1 Severity: None
Keywords: Cc:

Description

When trying to view with _ArrayDisplay, array.au3 crashes at:
Line #(depending on version) --> Local $avArrayText[$iUBound + 1]

#include <array.au3>

_Test()

Func _Test()
    Local $objWMI = ObjGet('Winmgmts:\\.\root\CIMV2')
    Local $objClass = $objWMI.Get('__NotifyStatus')
    Local $Value
    ;
    For $objItem in $objClass.SystemProperties_()
        $Value = $objItem.Value

        If IsArray($Value) Then

            MsgBox(0, '', 'Elements: ' & UBound($Value) & @CRLF & 'Subscripts: ' & UBound($Value, 0))

            _ArrayDisplay($Value)

        EndIf

    Next
EndFunc

Link: http://www.autoitscript.com/forum/topic/139097-arraydisplay-and-arrays-with-no-elements/

Attachments (0)

Change History (4)

comment:1 by trancexx, 14 years ago

That variable is array, so IsArray() is fine.
_ArrayDisplay() needs to check for situations like this.

comment:2 by trancexx, 14 years ago

Component: AutoItStandard UDFs
Summary: IsArray detects arrays with no elements_ArrayDisplay fails handling arrays with no elements

comment:3 by guinness, 14 years ago

Milestone: 3.3.9.3
Owner: set to guinness
Resolution: Fixed
Status: newclosed

Fixed by revision [6887] in version: 3.3.9.3

comment:4 by anonymous, 5 years ago

WGJW9 - MQBRH - C3VXP - DB6PF - M89P3

Modify Ticket

Action
as closed The owner will remain guinness.

Add Comment


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