mirror of
https://github.com/gbdev/rgbds.git
synced 2026-11-22 05:48:39 +00:00
Use _fseeki64/_ftelli64 on Windows since fseek/fell are limited by 32-bit long
This commit is contained in:
1 parent
c691ec6607
commit
50678d0942
3 files changed
+9
-2
No files matched your search
+1
-1
@@ -29,7 +29,7 @@ std::optional<uint64_t> seekSize(FILE *file) {
|
||||
if (fseek(file, 0, SEEK_END) != 0) {
|
||||
return std::nullopt;
|
||||
}
|
||||
long size = ftell(file);
|
||||
auto size = ftell(file); // Use `auto` since Windows' `_ftelli64` returns `__int64`, not `long`
|
||||
if (size < 0) {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user