diff --git a/src/SFML/System/FileInputStream.cpp b/src/SFML/System/FileInputStream.cpp index 6aef44a62..72f7eecf7 100644 --- a/src/SFML/System/FileInputStream.cpp +++ b/src/SFML/System/FileInputStream.cpp @@ -66,7 +66,7 @@ bool FileInputStream::open(const std::filesystem::path& filename) if (priv::getActivityStatesPtr() != nullptr) { m_androidFile = std::make_unique(filename); - return m_androidFile->tell() != -1; + return m_androidFile->tell().has_value(); } #endif #ifdef SFML_SYSTEM_WINDOWS