Trying to constrain the seek position when file is empty doesn't work out either, sorry.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4680 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
0e5dc5b2ce
commit
a751efcc6e
|
@ -153,9 +153,9 @@ CWII_IPC_HLE_Device_FileIO::Seek(u32 _CommandAddress)
|
|||
// AyuanX: this is still dubious because m_FileLength
|
||||
// isn't updated on the fly when write happens
|
||||
u32 NewSeekPosition = SeekPosition;
|
||||
if (SeekPosition > m_FileLength && Mode == 0)
|
||||
if (m_FileLength > 0 && SeekPosition > m_FileLength && Mode == 0)
|
||||
{
|
||||
NewSeekPosition = (m_FileLength) ? SeekPosition % m_FileLength : 0;
|
||||
NewSeekPosition = SeekPosition % m_FileLength;
|
||||
}
|
||||
|
||||
INFO_LOG(WII_IPC_FILEIO, "FileIO: New Seek Pos: 0x%08x, Mode: %i (%s)", NewSeekPosition, Mode, m_Name.c_str());
|
||||
|
|
Loading…
Reference in New Issue