From b5f3edf5fc5a065e382a644872d995f3cce91a92 Mon Sep 17 00:00:00 2001 From: "gergely.erdelyi" Date: Thu, 25 Jun 2009 16:11:17 +0000 Subject: [PATCH] idautils.py: Functions() now work properly if start is not inside a defined function --- python/idautils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/idautils.py b/python/idautils.py index b486d25..d3eb935 100644 --- a/python/idautils.py +++ b/python/idautils.py @@ -201,6 +201,8 @@ def Functions(start=idaapi.cvar.inf.minEA, end=idaapi.cvar.inf.maxEA): if it extends beyond 'end'. """ func = idaapi.get_func(start) + if not func: + func = idaapi.get_next_func(start) while func and func.startEA < end: yield func.startEA func = idaapi.get_next_func(func.startEA)