- Don't call M_NotifyNewSave() before closing the new savegame.

- Disallow negative read lengths in FileReader::Read().

SVN r2685 (trunk)
This commit is contained in:
Randy Heit 2010-09-04 03:02:13 +00:00
commit 61d438e1eb
2 changed files with 4 additions and 2 deletions

View file

@ -132,6 +132,8 @@ long FileReader::Seek (long offset, int origin)
long FileReader::Read (void *buffer, long len)
{
assert(len >= 0);
if (len <= 0) return 0;
if (FilePos + len > StartPos + Length)
{
len = Length - FilePos + StartPos;