diff --git a/src/openrct2-ui/windows/Changelog.cpp b/src/openrct2-ui/windows/Changelog.cpp index d61be74075..39165e71f3 100644 --- a/src/openrct2-ui/windows/Changelog.cpp +++ b/src/openrct2-ui/windows/Changelog.cpp @@ -73,7 +73,7 @@ public: { throw std::runtime_error("Unable to open " + path); } - auto length = fs.tellg(); + auto length = fs.end - fs.beg; std::unique_ptr buffer = std::make_unique(length); fs.read(buffer.get(), length); auto result = std::string(buffer.get(), buffer.get() + length);