revert changes to MXIOINFO::Seek()

This commit is contained in:
Ramen2X 2023-10-22 13:35:57 -04:00
parent f202c72a01
commit 3c0946f7ec
2 changed files with 5 additions and 5 deletions

View File

@ -124,9 +124,9 @@ MxLong MXIOINFO::Read(void *p_buf, MxLong p_len)
}
// OFFSET: LEGO1 0x100cca00
MxResult MXIOINFO::Seek(MxLong p_offset, int p_origin)
MxLong MXIOINFO::Seek(MxLong p_offset, int p_origin)
{
MxResult result = FAILURE;
MxLong result = -1;
// If buffered I/O
if (m_info.pchBuffer) {
@ -142,7 +142,7 @@ MxResult MXIOINFO::Seek(MxLong p_offset, int p_origin)
}
} else if (p_origin == SEEK_END) {
// not possible with buffered I/O
return FAILURE;
return -1;
}
// else p_origin == SEEK_SET.
@ -214,7 +214,7 @@ MxResult MXIOINFO::Seek(MxLong p_offset, int p_origin)
result = m_info.lDiskOffset;
if (result == FAILURE) {
if (result == -1) {
m_info.lDiskOffset = _llseek((HFILE)m_info.hmmio, 0, SEEK_CUR);
}
}

View File

@ -15,7 +15,7 @@ class MXIOINFO
MxU16 Open(const char *, MxULong);
MxU16 Close(MxLong);
MxLong Read(void *, MxLong);
MxResult Seek(MxLong, int);
MxLong Seek(MxLong, int);
MxU16 SetBuffer(char *, MxLong, MxLong);
MxU16 Flush(MxU16);
MxU16 Advance(MxU16);