﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
1684	"FileRead: negative ""count"" value in binary mode causes ""Error allocating memory"""	ChiDragon	Jpm	"Au3Check does not throw any error. The memory allocation error simply pops up when the script is executed.

The Help file gives no indication of what acceptable values of ""count"" may be, or how to force reading the whole file when ""count"" is specified. Negative values in text-mode do in fact cause the entire file to be read.

Sufficient to reproduce:
{{{
$Handle = FileOpen (@ScriptFullPath, 16)
$WholeFile = FileRead ($Handle, -1)
FileClose ($Handle)
}}}

As mentioned, no problems if ""0"" is used instead of ""16"" to read in text-mode. The whole file is simply read just the same as if ""count"" was never specified.
{{{
$Handle = FileOpen (@ScriptFullPath, 0)
$WholeFile = FileRead ($Handle, -1)
FileClose ($Handle)
MsgBox (0, """", $WholeFile)
}}}"	Bug	closed	3.3.7.0	AutoIt	3.3.6.1	None	Fixed	FileRead binary Error allocating memory	
