Skip to content

Commit cd6ac64

Browse files
committed
Tweak Image classes table cycle detection
1 parent b5c510a commit cd6ac64

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/game_engine/unity/mono.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,11 +332,9 @@ impl Image {
332332
.unwrap_or_default();
333333

334334
iter::from_fn(move || {
335-
#[cfg(feature = "alloc")]
336-
if seen.contains(&table) { return None; }
337335
if !table.is_null() {
338336
#[cfg(feature = "alloc")]
339-
seen.insert(table);
337+
if seen.replace(table).is_some() { return None; }
340338
let class = module.read_pointer(process, table).ok()?;
341339
table = module
342340
.read_pointer(

0 commit comments

Comments
 (0)