drivers/windows/file_access_windows.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/windows/file_access_windows.cpp b/drivers/windows/file_access_windows.cpp index 1b8760f..a051140 100644 --- a/drivers/windows/file_access_windows.cpp +++ b/drivers/windows/file_access_windows.cpp @@ -202,21 +202,21 @@ void FileAccessWindows::seek(size_t p_position) { ERR_FAIL_COND(!f); last_error = OK; - if (fseek(f, p_position, SEEK_SET)) + if (_fseeki64(f, p_position, SEEK_SET)) check_errors(); prev_op = 0; } void FileAccessWindows::seek_end(int64_t p_position) { ERR_FAIL_COND(!f); - if (fseek(f, p_position, SEEK_END)) + if (_fseeki64(f, p_position, SEEK_END)) check_errors(); prev_op = 0; } size_t FileAccessWindows::get_position() const { size_t aux_position = 0; - aux_position = ftell(f); + aux_position = _ftelli64(f); if (!aux_position) { check_errors(); }; @@ -227,9 +227,9 @@ size_t FileAccessWindows::get_len() const { ERR_FAIL_COND_V(!f, 0); size_t pos = get_position(); - fseek(f, 0, SEEK_END); + _fseeki64(f, 0, SEEK_END); int size = get_position(); - fseek(f, pos, SEEK_SET); + _fseeki64(f, pos, SEEK_SET); return size; } @@ -291,7 +291,7 @@ void FileAccessWindows::store_8(uint8_t p_dest) { if (flags == READ_WRITE || flags == WRITE_READ) { if (prev_op == READ) { if (last_error != ERR_FILE_EOF) { - fseek(f, 0, SEEK_CUR); + _fseeki64(f, 0, SEEK_CUR); } } prev_op = WRITE; @@ -304,7 +304,7 @@ void FileAccessWindows::store_buffer(const uint8_t *p_src, int p_length) { if (flags == READ_WRITE || flags == WRITE_READ) { if (prev_op == READ) { if (last_error != ERR_FILE_EOF) { - fseek(f, 0, SEEK_CUR); + _fseeki64(f, 0, SEEK_CUR); } } prev_op = WRITE;