2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 10:37:41 -04:00

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

This commit is contained in:
2012-01-08 18:11:00 -05:00
parent 83ff761632
commit a2c819ac26

View File

@ -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;