mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 04:26:03 +01:00
[MIRROR] Fixes some more holes in the ref tracker (#5701)
* Fixes some more holes in the ref tracker (#58972) * Fixes some more holes in the ref tracker The reference tracker was failing to check null keyed assoc list entries, along with being unable to check both lists in a list(list() = list()) pair This resolves that, and adds some new logic to the unit test to check for this sort of thing * Seperates the ref tracking unit test into 6 subtasks as requested * Fixes some more holes in the ref tracker Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
This commit is contained in:
@@ -118,19 +118,20 @@
|
||||
testing("Found [type] \ref[src] in list [container_name].")
|
||||
|
||||
//Check assoc entrys
|
||||
else if(element_in_list && !isnum(element_in_list) && normal && potential_container[element_in_list] == src)
|
||||
else if(!isnum(element_in_list) && normal && potential_container[element_in_list] == src)
|
||||
#ifdef REFERENCE_TRACKING_DEBUG
|
||||
found_refs[potential_container] = TRUE
|
||||
#endif
|
||||
testing("Found [type] \ref[src] in list [container_name]\[[element_in_list]\]")
|
||||
|
||||
//Check normal sublists
|
||||
else if(islist(element_in_list))
|
||||
DoSearchVar(element_in_list, "[container_name] -> [element_in_list] (list)", recursive_limit - 1, search_time)
|
||||
|
||||
//Check assoc sublists
|
||||
else if(element_in_list && !isnum(element_in_list) && normal && islist(potential_container[element_in_list]))
|
||||
DoSearchVar(potential_container[element_in_list], "[container_name]\[[element_in_list]\] -> [potential_container[element_in_list]] (list)", recursive_limit - 1, search_time)
|
||||
//We need to run both of these checks, since our object could be hiding in either of them
|
||||
else
|
||||
//Check normal sublists
|
||||
if(islist(element_in_list))
|
||||
DoSearchVar(element_in_list, "[container_name] -> [element_in_list] (list)", recursive_limit - 1, search_time)
|
||||
//Check assoc sublists
|
||||
if(!isnum(element_in_list) && normal && islist(potential_container[element_in_list]))
|
||||
DoSearchVar(potential_container[element_in_list], "[container_name]\[[element_in_list]\] -> [potential_container[element_in_list]] (list)", recursive_limit - 1, search_time)
|
||||
|
||||
#ifndef FIND_REF_NO_CHECK_TICK
|
||||
CHECK_TICK
|
||||
|
||||
Reference in New Issue
Block a user