Modify

Opened 7 years ago

Closed 7 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 (3)

comment:1 Changed 7 years ago by trancexx

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

comment:2 Changed 7 years ago by trancexx

  • Component changed from AutoIt to Standard UDFs
  • Summary changed from IsArray detects arrays with no elements to _ArrayDisplay fails handling arrays with no elements

comment:3 Changed 7 years ago by guinness

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

Fixed by revision [6887] in version: 3.3.9.3

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 guinness.
Author


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

 
Note: See TracTickets for help on using tickets.