﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
1861	_ArrayDisplay: Bug when data contains separator and $sHeader is used	Thomas Rupp <thomas.rupp@…>	guinness	"If the table to display contains the default GUIDataSeparatorChar (""|"") and you use $sHeader the resulting display is wrong.

Example:
{{{
#include <array.au3>
Global $aTestArray1[1] = [""Test|Row 1""]
_ArrayDisplay($aTestArray1, ""Test Array 1"", -1, 0, """", ""|"", ""Rows|Column0"")
}}}

should result in:
Rows Column0
[0]  Test|Row 1

but you get:
Rows|Column0
[0]
[0]

Suggested solution:

Replace (starting with line 362):
{{{
; Set header up
If $sHeader = """" Then
  $sHeader = ""Row  "" ; blanks added to adjust column size for big number of rows
  For $i = 0 To $iSubMax
    $sHeader &= $sSeparator & ""Col "" & $i
  Next
EndIf
}}}

with:
{{{
; Set header up
If $sHeader = """" Then
  $sHeader = ""Row  ""	; blanks added to adjust column size for big number of rows
  For $i = 0 To $iSubMax
    $sHeader &= $sSeparator & ""Col "" & $i
  Next
ElseIf $sDataSeparatorChar <> $sSeparator Then
  $sHeader = StringReplace($sHeader, $sDataSeparatorChar, $sSeparator)
EndIf
}}}

"	Bug	closed	3.3.9.5	Standard UDFs	3.3.6.1	None	Fixed		
