Skip to content

Commit

Permalink
Merge pull request #544 from UE4SS-RE/winfile-invalidation-fix
Browse files Browse the repository at this point in the history
fix(WinFile): File invalidation didn't take into account memory maps
  • Loading branch information
UE4SS committed Jun 2, 2024
2 parents 7ce9870 + 90b10ea commit edaf6fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions assets/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ Fixed a crash caused by a race condition enabled by C++ mods using `UE4SS_ENABLE

Fixed the `std::span` returned by `FileHandle::memory_map` being improperly sized. ([UE4SS #507](https://github.com/UE4SS-RE/RE-UE4SS/pull/507))

Fixed 'File::Handle' unable to be moved if used in conjunction with memory_map. ([UE4SS #544](https://github.com/UE4SS-RE/RE-UE4SS/pull/544))

### BPModLoader
Fixed "bad conversion" errors ([UE4SS #398](https://github.com/UE4SS-RE/RE-UE4SS/pull/398))

Expand Down
2 changes: 2 additions & 0 deletions deps/first/File/src/FileType/WinFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ namespace RC::File
auto WinFile::invalidate_file() noexcept -> void
{
m_file = nullptr;
m_map_handle = nullptr;
m_memory_map = nullptr;
}

auto WinFile::delete_file(const std::filesystem::path& file_path_and_name) -> void
Expand Down

0 comments on commit edaf6fc

Please sign in to comment.