Modify

Opened 11 years ago

Closed 11 years ago

#2939 closed Bug (Fixed)

_GUICtrlStatusBar_Create zeros part widths when PartWidth array given but PartText not same size array

Reported by: anonymous Owned by: Melba23
Milestone: 3.3.13.20 Component: AutoIt
Version: 3.3.12.0 Severity: None
Keywords: _GUICtrlStatusBar_Create Cc:

Description

If _GUICtrlStatusBar_Create is called with an array of $vPartWidth but $vPartText is either "" or a smaller array, then the PartWidths are incorrectly set to "" (so treated as 0)

This is most likely to be seen when the caller does not wish to set any $vPartText but wishes to set the styles. Calling the function with the given $vPartsText default of "" and a style results in all parts being created with width of 0.

This is the part of the code in GuiStatusBar.au3 with the problem

    ; if partwidth array is not same size as parttext array use larger sized array for size
    If UBound($aPartWidth) <> UBound($aPartText) Then
        Local $iLast
        If UBound($aPartWidth) > UBound($aPartText) Then ; width array is larger
            $iLast = UBound($aPartText)
            ReDim $aPartText[UBound($aPartWidth)]
            For $x = $iLast To UBound($aPartText) - 1
                $aPartWidth[$x] = ""
	    Next

The $aPartWidth[$x] = "" should be $aPartText[$x] = "".
(actually the whole loop is redundant as the redim has cleared the extra $aPartText elements anyway.)

This issue exists in 3.3.8.1, 3.3.12.0 and 3.3.13.19.

Regards
Alan Parry

Attachments (0)

Change History (1)

comment:1 by Melba23, 11 years ago

Milestone: 3.3.13.20
Owner: set to Melba23
Resolution: Fixed
Status: newclosed

Fixed by revision [11154] in version: 3.3.13.20

Modify Ticket

Action
as closed The owner will remain Melba23.

Add Comment


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