Преглед изворни кода

Handle case where given class itself is the base for a vfn

nosoop пре 11 месеци
родитељ
комит
b8eba75446
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/smgdc/angr/vtable_disamb.py

+ 1 - 1
src/smgdc/angr/vtable_disamb.py

@@ -176,7 +176,7 @@ class VtableDisambiguator(angr.Analysis):
 
     def get_parent_vt_implementing(self, vtsym: Symbol, vtidx: int) -> Symbol:
         # walk up parents until we reach the first one to implement this method
-        for super_vtsym, gp_vtsym in itertools.pairwise(self.superclass_map[vtsym]):
+        for super_vtsym, gp_vtsym in itertools.pairwise([vtsym, *self.superclass_map[vtsym]]):
             vt_first, *_ = self.get_vfptrs_from_table(gp_vtsym)
             if len(vt_first) < vtidx:
                 return super_vtsym