idautils.py: Functions() now work properly if start is not inside a defined function

This commit is contained in:
gergely.erdelyi 2009-06-25 16:11:17 +00:00
parent dadf628feb
commit b5f3edf5fc

View File

@ -201,6 +201,8 @@ def Functions(start=idaapi.cvar.inf.minEA, end=idaapi.cvar.inf.maxEA):
if it extends beyond 'end'. if it extends beyond 'end'.
""" """
func = idaapi.get_func(start) func = idaapi.get_func(start)
if not func:
func = idaapi.get_next_func(start)
while func and func.startEA < end: while func and func.startEA < end:
yield func.startEA yield func.startEA
func = idaapi.get_next_func(func.startEA) func = idaapi.get_next_func(func.startEA)