Opened 16 years ago
Closed 16 years ago
#1406 closed Feature Request (Rejected)
Proposed Change to _WinAPI_HiWord()
| Reported by: | wraithdu | Owned by: | Gary |
|---|---|---|---|
| Milestone: | Component: | Standard UDFs | |
| Version: | Severity: | None | |
| Keywords: | Cc: |
Description
Considering the discussion a few weeks ago about BitShift being a *signed* shift in AutoIt, shouldn't the _WinAPI_HiWord function, and indeed all UDF functions where a DWORD needs to be split into hi and lo words by any means (the _WinAPI_HiWord function or manually via BitShift), be changed accordingly:
Func _WinAPI_HiWord($iLong)
Return BitAND(BitShift($iLong, 16), 0xFFFF)
EndFunc ;==>_WinAPI_HiWord
While an error likely won't occur very often, this is the only way to assure we are getting the correct hi word result, unless AutoIt changes the way it does BitShift to be unsigned.
I understand if you want to forgo this change in favor of waiting until AutoIt's internal number handling is revamped, but it is a viable patch in the meantime.
Attachments (0)
Change History (2)
comment:1 by , 16 years ago
| Version: | 3.3.3.3 |
|---|
comment:2 by , 16 years ago
| Resolution: | → Rejected |
|---|---|
| Status: | new → closed |
As mentioned on the forum, temporary fixes are not something I'm fond of making.

Automatic ticket cleanup.