mirror of
https://github.com/cemu-project/idapython.git
synced 2024-11-28 12:04:19 +01:00
GetDouble() and GetFloat() now use idaapi.get_many_bytes()
This commit is contained in:
parent
7d32ff30f0
commit
33c93df0cf
@ -1751,11 +1751,7 @@ def GetFloat(ea):
|
|||||||
|
|
||||||
@return: float
|
@return: float
|
||||||
"""
|
"""
|
||||||
tmp = chr(idaapi.get_byte(ea)) + \
|
tmp = idaapi.get_many_bytes(ea, 4)
|
||||||
chr(idaapi.get_byte(ea+1)) + \
|
|
||||||
chr(idaapi.get_byte(ea+2)) + \
|
|
||||||
chr(idaapi.get_byte(ea+3))
|
|
||||||
|
|
||||||
return struct.unpack("f", tmp)[0]
|
return struct.unpack("f", tmp)[0]
|
||||||
|
|
||||||
|
|
||||||
@ -1767,15 +1763,7 @@ def GetDouble(ea):
|
|||||||
|
|
||||||
@return: double
|
@return: double
|
||||||
"""
|
"""
|
||||||
tmp = chr(idaapi.get_byte(ea)) + \
|
tmp = idaapi.get_many_bytes(ea, 8)
|
||||||
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))
|
|
||||||
|
|
||||||
return struct.unpack("d", tmp)[0]
|
return struct.unpack("d", tmp)[0]
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user