error checks to trace https://sourceforge.net/tracker/index.php?func=detail&aid=1035264&group_id=37892&atid=421366
fix error message
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user