diff --git a/src/UESaveFile/BinaryReader.cpp b/src/UESaveFile/BinaryReader.cpp index 2a4eeac..a34486e 100644 --- a/src/UESaveFile/BinaryReader.cpp +++ b/src/UESaveFile/BinaryReader.cpp @@ -45,6 +45,10 @@ auto BinaryReader::position() -> Long { return _ftelli64(_file); } +auto BinaryReader::seek(Long position) -> bool { + return _fseeki64(_file, position, SEEK_SET) == 0; +} + void BinaryReader::closeFile() { std::fclose(_file); _file = nullptr; diff --git a/src/UESaveFile/BinaryReader.h b/src/UESaveFile/BinaryReader.h index 881d1fd..253d14f 100644 --- a/src/UESaveFile/BinaryReader.h +++ b/src/UESaveFile/BinaryReader.h @@ -36,6 +36,8 @@ class BinaryReader { auto eof() -> bool; auto position() -> Long; + auto seek(Long position) -> bool; + void closeFile(); auto readChar(char& value) -> bool;