diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-21 12:48:46 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-21 12:48:46 +0100 |
commit | c0f27919a98b9083c967cfd7c464a53b7cdc7f14 (patch) | |
tree | 49c708625ccf408ecf9fe2d24cc159b8b595b728 /serialize/savegame.cpp | |
parent | 758476aca228b1fc0fe0b54aeaa7c915964082ab (diff) |
a
Diffstat (limited to 'serialize/savegame.cpp')
-rw-r--r-- | serialize/savegame.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/serialize/savegame.cpp b/serialize/savegame.cpp index 667d2f0b..917234e1 100644 --- a/serialize/savegame.cpp +++ b/serialize/savegame.cpp @@ -549,8 +549,8 @@ class world world::deserialize(StringView filename) noexcept(false) fm_throw("fopen(\"{}\", \"r\"): {}"_cf, filename, get_error_string(errbuf)); if (int ret = std::fseek(f, 0, SEEK_END); ret != 0) fm_throw("fseek(SEEK_END): {}"_cf, get_error_string(errbuf)); - size_t len = std::ftell(f); - if (auto len_ = std::ftell(f); len_ >= 0) + size_t len; + if (auto len_ = ::ftell(f); len_ >= 0) len = (size_t)len_; else fm_throw("ftell: {}"_cf, get_error_string(errbuf)); |