Used read length (and suppress warning)

This commit is contained in:
Jonathan Adamczewski
2014-03-23 23:07:40 -07:00
parent 88484cbd7d
commit 1d05c18c00
6 changed files with 39 additions and 11 deletions

View File

@@ -312,8 +312,8 @@ bool FileIO::write(const void* ptr, const size_t size)
bool FileIO::read(void* ptr, const size_t size)
{
if (!m_fp || m_mode != 2) return false;
fread(ptr, size, 1, m_fp);
return true;
size_t readLen = fread(ptr, size, 1, m_fp);
return readLen == 1;
}