// note that real length may be less than file length for text files with DOS EOLs
// ('\r's get dropped by CRT when reading which means that we have
// realLen = fileLen - numOfLinesInTheFile)
- length = fread(buf.data(), sizeof(char), length, m_fp);
+ length = fread(buf.data(), 1, length, m_fp);
if ( Error() )
{