Jump to content

Recommended Posts

Posted (edited)

Hey guys,

Having a bit of a problem after updating to 3.3.8.0. Here is a reproducer:

Local $base_address = "0x03820040"

Local $Clock_address = "0x" & Hex($base_address + 0x4)

MsgBox(0, "", "$base_address is " & Hex($base_address) & @CRLF & @CRLF & _
"$Clock_address is " & $Clock_address)

With 3.3.6.1 this returns:

$base_address is 03820040


$Clock_address is 0x03820044

With 3.3.8.0 this returns:

$base_address is 03820040


$Clock_address is 0x418C100220000000

I read through the change log and looked at changes to Hex(), but as far as I can see, none of them should break the script above.

Can anyone help me with this?

Thanks in advance,

tom

Edited by tomaskir
Posted (edited)

you need to specific the wanted length, usually 8 bytes.

Local $base_address = 0x03820040
Local $Clock_address = "0x" & Hex($base_address + 0x4, 8)
MsgBox(0, "", "$base_address is " & Hex($base_address, 8) & @CRLF & @CRLF & _
"$Clock_address is " & $Clock_address)

Doesnt work if

$base_address = "0x03820040"

Thats the main issue, $base_address in my case is a string.

Edited by tomaskir

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...