Browse Source

Make hsRAMStream's read() NOT throw an exception. We now match hsUNIXStream::Read()'s functionality

Adam Johnson 13 years ago
parent
commit
a2c819ac26
  1. 3
      Sources/Plasma/CoreLib/hsStream.cpp

3
Sources/Plasma/CoreLib/hsStream.cpp

@ -1054,10 +1054,7 @@ hsBool hsRAMStream::AtEnd()
UInt32 hsRAMStream::Read(UInt32 byteCount, void * buffer)
{
if (fBytesRead + byteCount > fAppender.Count() * fAppender.ElemSize())
{
hsThrow("Attempting to read past end of stream");
byteCount = (fAppender.Count() * fAppender.ElemSize()) - fBytesRead;
}
fBytesRead += byteCount;
fPosition += byteCount;

Loading…
Cancel
Save