0

I'm trying to extract a float value at the current linear address in the IDC script, but I can't figure out how to do this.

Disassembly example:

.rdata:004F8360 flt_4F8360      dd 0.69999999           ; DATA XREF: sub_4071E0+68r

I want to print this float value in the console message like this:

Value: 0.69999999

I've tried (unsuccessfully):

  • Dword(ea)

    Message("Value: %f", Dword(ea));
    
    Value: 1.060320051e9
    
  • GetManyBytes(ea, 4, 0):

    Message("Value: %f", GetManyBytes(ea, 4, 0));
    
    Value: 3.33e2
    

So how does one achieves this?

1 Answer 1

4

By looking at the documentation.

Use GetFloat.

1
  • 1
    Thanks! The reason I asked, is that I couldn't find it in the docs. Now I see, that it's because I've looked at the wrong ones. Commented Jun 7, 2015 at 7:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.