From a759f4414bab8762771f27bf135053a2ac663283 Mon Sep 17 00:00:00 2001 From: Chris Pressey Date: Thu, 29 Mar 2018 16:50:07 +0100 Subject: [PATCH] Make tests pass again. --- src/sixtypical/analyzer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sixtypical/analyzer.py b/src/sixtypical/analyzer.py index 277354b..b107ed7 100644 --- a/src/sixtypical/analyzer.py +++ b/src/sixtypical/analyzer.py @@ -314,8 +314,9 @@ class Analyzer(object): for routine in program.routines: context = self.analyze_routine(routine) if context: - for encountered_goto in context.encountered_gotos(): - fallthru_map.setdefault(encountered_goto.name, set()).add(routine.name) + encountered_gotos = list(context.encountered_gotos()) + if len(encountered_gotos) == 1 and isinstance(encountered_gotos[0].type, RoutineType): + fallthru_map.setdefault(encountered_gotos[0].name, set()).add(routine.name) program.fallthru_map = dict([(k, sorted(v)) for k, v in fallthru_map.iteritems()]) def analyze_routine(self, routine):