fix error message
This commit is contained in:
Glenn Maynard
2004-10-06 04:25:27 +00:00
parent 322b40e1f6
commit 12c21c302c
2 changed files with 6 additions and 2 deletions
+4 -2
View File
@@ -333,7 +333,9 @@ int RageFile::GetFileSize() const
/* GetFileSize() may need to do non-const-like things--the default implementation reads
* until the end of file to emulate it. However, it should always restore the state to
* the way it was, so pretend it's const. */
return const_cast<RageFileObj*>(m_File)->GetFileSize();
int iRet = const_cast<RageFileObj*>(m_File)->GetFileSize();
ASSERT_M( iRet >= 0, ssprintf("%i", iRet) );
return iRet;
}
void RageFile::Rewind()
@@ -342,7 +344,7 @@ void RageFile::Rewind()
RageException::Throw("\"%s\" is not open.", GetPath().c_str());
if( !(m_Mode&READ) )
RageException::Throw("\"%s\" is not open for reading; can't GetFileSize", GetPath().c_str());
RageException::Throw("\"%s\" is not open for reading; can't Rewind", GetPath().c_str());
m_EOF = false;