Modify

Opened 10 months ago

Closed 8 months ago

Last modified 8 months ago

#3876 closed Bug (Fixed)

Hex Number Arithmetic is incorrect

Reported by: Zvend Owned by: Jon
Milestone: 3.3.16.1 Component: AutoIt
Version: 3.3.16.0 Severity: None
Keywords: Hex Number Arithmetic Cc: Melba23

Description

The hex arithmetic in the newest version broke compared to previous versions.

;~ AutoIt v3.3.14.5
Const $OFFSET = -0x46
Local $pSomePointer = Ptr(0x3100000 + $OFFSET)
ConsoleWrite("Pointer is: " & $pSomePointer & @CRLF)

Output:

Pointer is: 0x030FFFBA (Correct hex arithmetic)
;~ AutoIt v3.3.16.0
Const $OFFSET = -0x46
Local $pSomePointer = Ptr(0x3100000 + $OFFSET)
ConsoleWrite("Pointer is: " & $pSomePointer & @CRLF)

Output:

Pointer is: 0x03100046 (Incorrect hex arithmetic)

For more information see: https://www.autoitscript.com/forum/topic/207897-hex-number-arithmetic-is-incorrect-on-v33160/

Attachments (0)

Change History (7)

comment:1 Changed 10 months ago by Jpm

  • Owner set to Jpm
  • Status changed from new to assigned

Thanks,
Fix sent to Jon

comment:2 Changed 10 months ago by Zvend

Hey, just for my information: When will the fix be applied? so i can continue moving my project to the newest autoit version

comment:3 Changed 10 months ago by Jpm

Hi I cannot answer this question as Jon will do it when It has time
in fact this pb come from a regression introduce by #3772 which will be fix by the fixing of #3869

Sorry for the trouble

Last edited 10 months ago by Jpm (previous) (diff)

comment:4 follow-up: Changed 10 months ago by anonymous

Hello,

i found the same problem in all beta versions since 3.3.14.5, you can bypass them by wrote

Const $OFFSET = -(0x46)

Sascha

comment:5 in reply to: ↑ 4 Changed 10 months ago by Zbend

Replying to anonymous:

Hello,

i found the same problem in all beta versions since 3.3.14.5, you can bypass them by wrote

Const $OFFSET = -(0x46)

Sascha

thats only a bypass for hardcoded offsets. If you have functions where you dont know if the output value is supposed to be positive or negative this bypass wont work out. also that "solution" was mentioned in the link i provided

comment:6 Changed 8 months ago by Jon

  • Milestone set to 3.3.15.6
  • Owner changed from Jpm to Jon
  • Resolution set to Fixed
  • Status changed from assigned to closed

Fixed by revision [12732] in version: 3.3.15.6

comment:7 Changed 8 months ago by Jon

  • Milestone changed from 3.3.15.6 to 3.3.16.1

Fixed by revision [12734] in version: 3.3.16.1

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain Jon.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.