﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
1586	DllStructSetData(char, 1, string-with-NUL-character), junk data(?)	anonymous	Jon	"kinda expect the character part to end up with 0x61.00.63.00.64 or 0x61.00.00.00.00
anything else (junk data?) seems like a bug to me.
{{{
Local $sOrg = 'a' & Chr(0) & 'c' & Chr(0) & 'd' ;; -> a[NUL]c[NUL]d
ConsoleWrite('StringLen($sOrg) = ' & StringLen($sOrg) & @CRLF) ;; 5
$sCnv = StringReplace($sOrg, Chr(0), Chr(0), 0, 1) ;; -> a[NUL]c[NUL]d
$sCnv = StringReplace($sOrg, Chr(0), '[nul]', 0, 1) ;; -> a[nul]c[nul]d
ConsoleWrite('$sCnv = ' & $sCnv & @CRLF)

Local $tChar = DllStructCreate('char[5]')
Local $tByte = DllStructCreate('byte[5]', DllStructGetPtr($tChar)) ;; assuming ansi.
DllStructSetData($tByte, 1, $sOrg) ;; -> 0x61.00.63.00.64
ConsoleWrite('$tByte = ' & DllStructGetData($tByte, 1) & @CRLF)
DllStructSetData($tChar, 1, $sOrg) ;; -> 0x61.00.99.01.20 -> a.NUL.(junk?)
ConsoleWrite('$tByte = ' & DllStructGetData($tByte, 1) & @CRLF)

;; $sOrg still unchanged. just making sure.
$sCnv = StringReplace($sOrg, Chr(0), '[nul]', 0, 1) ;; -> a[nul]c[nul]d
ConsoleWrite('$sCnv = ' & $sCnv & @CRLF)
}}}
but than again ..."	Bug	closed	3.3.7.7	AutoIt	3.3.6.1	None	Fixed		
