Browse Source

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

nosoop 10 months ago
parent
commit
b8eba75446
1 changed files with 1 additions and 1 deletions
  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