Modify ↓
#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 , 14 years ago
comment:2 by , 14 years ago
| Component: | AutoIt → Standard UDFs |
|---|---|
| Summary: | IsArray detects arrays with no elements → _ArrayDisplay fails handling arrays with no elements |
comment:3 by , 14 years ago
| Milestone: | → 3.3.9.3 |
|---|---|
| Owner: | set to |
| Resolution: | → Fixed |
| Status: | new → closed |
Fixed by revision [6887] in version: 3.3.9.3
Note:
See TracTickets
for help on using tickets.

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