mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Second attempt at issue 3458. Fixes issue 3458.
Replaces all occurrences of ftell and fseek with ftello and fseeko, respectively. This matters on non-win32 where only these names are altered by the _FILE_OFFSET_BITS define. Win32 still just maps the funcs to ftelli64/fseeki64. Also add some File::GetSize I had skipped in my last commit. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6515 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -84,7 +84,7 @@ bool SysConf::LoadFromFileInternal(FILE *f)
|
||||
for (size_t i = 0; i < m_Entries.size() - 1; i++)
|
||||
{
|
||||
SSysConfEntry& curEntry = m_Entries.at(i);
|
||||
if (fseek(f, curEntry.offset, SEEK_SET) != 0) return false;
|
||||
if (fseeko(f, curEntry.offset, SEEK_SET) != 0) return false;
|
||||
|
||||
u8 description = 0;
|
||||
if (fread(&description, sizeof(description), 1, f) != 1) return false;
|
||||
@ -142,7 +142,7 @@ bool SysConf::SaveToFile(const char *filename)
|
||||
for (size_t i = 0; i < m_Entries.size() - 1; i++)
|
||||
{
|
||||
// Seek to after the name of this entry
|
||||
if (fseek(f, m_Entries.at(i).offset + m_Entries.at(i).nameLength + 1, SEEK_SET) != 0) return false;
|
||||
if (fseeko(f, m_Entries.at(i).offset + m_Entries.at(i).nameLength + 1, SEEK_SET) != 0) return false;
|
||||
// We may have to write array length value...
|
||||
if (m_Entries.at(i).type == Type_BigArray)
|
||||
{
|
||||
|
Reference in New Issue
Block a user