Jump to content

Hex Number Arithmetic is incorrect on v3.3.16.0


Recommended Posts

@Jon
So I ve been upgrading my softwares to v3.3.16.0 and nothing was working anymore.
I am using couple of C Dlls within my autoit scripts. For this I need Pointer and structs logic.
And whenever I am working in the address area i only use hex values. But now this is breaking everything.

Here is my test:

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

Out:

Pointer is: 0x030FFFBA (Correct hex arithmetic)



Newest Version:

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

Out:

Pointer is: 0x03100046 (Incorrect hex arithmetic)


Will there be any fix soon for this?

Thank you for reading

Zvend

Utils-For-AutoIt:

  • C++ like Vectors in plain AutoIt
  • Flag Arrays. (Use Booleans in a very efficient storage container with endless Indecies.)
  • Prefixed Arrays. Name in progress. Auto resized Arrays for ID values. 0 reserved for its size.
  • Callback Arrays. Name in progress. 2D Array for event based message callbacks.
  • Dll. Load Dlls from a BinaryString and use its functions. Checks for Dll Validation (PE File Formats).
  • Integer. Not sure about the name either. Simple Functions to convert Integers in different sized.
  • UnitTest. A simple UDF providing UnitTests. Adjusted for github workflows. (Check repo)

 

Link to comment
Share on other sites

yes that works for hardcoded offsets. i have a function in my Dll that passes me offsets which can be positive and negative.
 

If $nOffset >= 0 Then
    ConsoleWrite("Offset is positive." & @CRLF)
Else
    ConsoleWrite("Offset is negative." & @CRLF)
EndIf


I dont want to go through 42k lines and test everything if it is correct, bcs for me this is clearly a bug :(

Utils-For-AutoIt:

  • C++ like Vectors in plain AutoIt
  • Flag Arrays. (Use Booleans in a very efficient storage container with endless Indecies.)
  • Prefixed Arrays. Name in progress. Auto resized Arrays for ID values. 0 reserved for its size.
  • Callback Arrays. Name in progress. 2D Array for event based message callbacks.
  • Dll. Load Dlls from a BinaryString and use its functions. Checks for Dll Validation (PE File Formats).
  • Integer. Not sure about the name either. Simple Functions to convert Integers in different sized.
  • UnitTest. A simple UDF providing UnitTests. Adjusted for github workflows. (Check repo)

 

Link to comment
Share on other sites

  • Moderators

Hi,

Please open a bug report in Trac - that way the Devs will be sure to see it.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

10 hours ago, Melba23 said:

Hi,

Please open a bug report in Trac - that way the Devs will be sure to see it.

M23

I removed the solution mark and rather comment here, that I did open a ticket.
If the ticket got accepted and fixed I will mark this as solved.
Thanks for the advice, I absolutely did not see the ticket section.

Utils-For-AutoIt:

  • C++ like Vectors in plain AutoIt
  • Flag Arrays. (Use Booleans in a very efficient storage container with endless Indecies.)
  • Prefixed Arrays. Name in progress. Auto resized Arrays for ID values. 0 reserved for its size.
  • Callback Arrays. Name in progress. 2D Array for event based message callbacks.
  • Dll. Load Dlls from a BinaryString and use its functions. Checks for Dll Validation (PE File Formats).
  • Integer. Not sure about the name either. Simple Functions to convert Integers in different sized.
  • UnitTest. A simple UDF providing UnitTests. Adjusted for github workflows. (Check repo)

 

Link to comment
Share on other sites

  • Moderators

Zvend,

No problem - thanks for bringing it to our attention.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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