﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
1234	Scripting.Dictionary call converting referenced AutoIt booleans to numbers	Gabriel13	Valik	"I've run into a situation where a Scripting.Dictionary object method call is changing variable types within an AutoIt array, simply by referencing them.

{{{
func testDictionary($a)
	local $d=objCreate('Scripting.Dictionary')
	for $i=0 to ubound($a)-1
		$d.add($i,$a[$i])
	next
	return $d
endfunc

local $aTest[2]=[false,true]

msgbox(0,default,$aTest[0]) ; displays false
msgbox(0,default,$aTest[1]) ; displays true

local $ignore=testDictionary($aTest)

msgbox(0,default,$aTest[0]) ; displays 0 instead of false
msgbox(0,default,$aTest[1]) ; displays 1 instead of true
}}}

Apparently, when the $d.add() call references $a[$i], it's also converting booleans to numbers within the array itself, and those changes are reflected in the original array afterwards.

In this example, the problem goes away if I change the top line to:

{{{
func testDictionary(const byRef $a)
}}}

I've verified that this bug is present in the 3.3.1.3 beta as well."	Bug	closed	3.3.1.5	AutoIt	3.3.0.0	Blocking	Fixed		
