Modify

#1215 closed Bug (Fixed)

_arrayDisplay() displays incorrectly when pipe character is is present in flelds.

Reported by: anonymous Owned by: Jpm
Milestone: 3.3.1.3 Component: Standard UDFs
Version: 3.3.1.1 Severity: None
Keywords: _arrayDisplay Cc:

Description

Environment = 3.3.1.1 under WIN_XP/Service Pack 3 X86

In AutoIt beta 3.3.1.1 _arrayDisplay() displays data incorrectly under specific conditions.
When the default separator character is "|" and is present in the array data, the _arrayDisplay() displays rows twice and columns that contain the separator character are truncated at the separator character.
AutoIt 3.3.0.0 truncates data in columns but does not display rows twice.
Reproduction Script

#include <array.au3>
;displays rows twice and only data up to pipe character in second column
Global $a[5][2] = [[1,"a|A"],[2,"b|B"],[3,"c|C"],[4,"d|D"],[5,"e|E"]]
_ArrayDisplay($a)

;displays correctly
Global $a[5][2] = [[1,"a,A"],[2,"b,B"],[3,"c,C"],[4,"d,D"],[5,"e,E"]]
_ArrayDisplay($a)

A possible fix is to add the following lines

  If $sSeparator = $sReplace Then
    If $sSeparator = Chr(124) Then
      $sReplace = Chr(126)
    Else
      $sReplace = Chr(124)
    EndIf
  EndIf

immediately after this line in _arrayDisplay().

  If $sSeparator = "" Then $sSeparator = Chr(124)

Attachments (0)

Change History (3)

comment:1 by Bowmore, on Oct 13, 2009 at 8:36:11 PM

Forgot to add my name to the above report.

comment:2 by Jpm, on Oct 14, 2009 at 10:36:06 AM

Owner: changed from Gary to Jpm
Status: newassigned

comment:3 by Jpm, on Oct 15, 2009 at 5:45:10 PM

Milestone: 3.3.1.3
Resolution: Fixed
Status: assignedclosed

Fixed in version: 3.3.1.3

Modify Ticket

Action
as closed The owner will remain Jpm.

Add Comment


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