Skip to content

Commit

Permalink
SceneDataStore: handle null
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKnauth committed Feb 19, 2024
1 parent ceeff46 commit e5cb942
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/hollow_knight_memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3342,6 +3342,9 @@ impl SceneDataStore {
let offsets = gmf.scene_data_pointers.offsets(prc, &gmf.module, &gmf.image)?;
let mut killed = 0;
for pbi in list_object_iter(prc, &gmf.string_list_offests, pbis)? {
if pbi.is_null() {
continue;
}
let scene_addr = prc.read_pointer(pbi + offsets.persistentbooldata_scenename, gmf.string_list_offests.pointer_size).ok()?;
let scene_str = read_string_object::<SCENE_PATH_SIZE>(prc, &gmf.string_list_offests, scene_addr)?;
if !scene_str.starts_with("RestingGrounds_08") {
Expand Down

0 comments on commit e5cb942

Please sign in to comment.