From 33c93df0cfb1f1089928a8d2dcae27fcb3568e0f Mon Sep 17 00:00:00 2001 From: "elias.bachaalany" Date: Fri, 5 Mar 2010 10:59:23 +0000 Subject: [PATCH] GetDouble() and GetFloat() now use idaapi.get_many_bytes() --- python/idc.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/python/idc.py b/python/idc.py index 13eebdf..733b6fb 100644 --- a/python/idc.py +++ b/python/idc.py @@ -1751,11 +1751,7 @@ def GetFloat(ea): @return: float """ - tmp = chr(idaapi.get_byte(ea)) + \ - chr(idaapi.get_byte(ea+1)) + \ - chr(idaapi.get_byte(ea+2)) + \ - chr(idaapi.get_byte(ea+3)) - + tmp = idaapi.get_many_bytes(ea, 4) return struct.unpack("f", tmp)[0] @@ -1767,15 +1763,7 @@ def GetDouble(ea): @return: double """ - tmp = chr(idaapi.get_byte(ea)) + \ - chr(idaapi.get_byte(ea+1)) + \ - chr(idaapi.get_byte(ea+2)) + \ - chr(idaapi.get_byte(ea+3)) + \ - chr(idaapi.get_byte(ea+4)) + \ - chr(idaapi.get_byte(ea+5)) + \ - chr(idaapi.get_byte(ea+6)) + \ - chr(idaapi.get_byte(ea+7)) - + tmp = idaapi.get_many_bytes(ea, 8) return struct.unpack("d", tmp)[0]