summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorayuanx <ayuanx@gmail.com>2009-12-11 10:32:33 +0000
committerayuanx <ayuanx@gmail.com>2009-12-11 10:32:33 +0000
commita751efcc6ee2b7fbc4ba4ff3b16b9732685ebc8f (patch)
tree440aac0dd780dd2c617ed8797b6cf8f6d3c0f2d8 /Source
parent0e5dc5b2ce60df8abe164b9ccd1fbff7dcd445da (diff)
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
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp
index 8d58a152cc..5509f280bb 100644
--- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp
+++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp
@@ -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());