Fix assert.

Always open() files with O_BINARY, so Windows doesn't mess with
data.  We can handle newlines on our own.
This commit is contained in:
Glenn Maynard
2003-09-24 02:00:13 +00:00
parent a12b841a4f
commit 49900b445e
+2 -2
View File
@@ -139,7 +139,7 @@ bool MsdFile::ReadFile( CString sNewPath )
int fd;
/* Open a file. */
if( (fd = open(sNewPath, O_RDONLY, 0)) == -1 )
if( (fd = open(sNewPath, O_RDONLY|O_BINARY, 0)) == -1 )
{
error = strerror(errno);
return false;
@@ -153,7 +153,7 @@ bool MsdFile::ReadFile( CString sNewPath )
int iBytesRead = read( fd, szFileString, iBufferSize );
close( fd );
ASSERT( iBufferSize > iBytesRead );
ASSERT( iBufferSize >= iBytesRead );
ReadBuf(szFileString, iBytesRead);