fix: weapon seed's low dword being sign extended #1914

Merged
Sainan merged 1 commits from lodword-fix into main 2025-04-29 12:28:01 -07:00
Owner

JavaScript's semantics here are incredibly stupid, but basically if the initial DWORD's high WORD's MSB is true, the number would become negative after the shift left by 16. Then when ORing it with the highDword, the initial DWORD would be sign-extended to a QWORD, meaning the high DWORD would become all 1s, basically cancelling out the entire OR operation.

JavaScript's semantics here are incredibly stupid, but basically if the initial DWORD's high WORD's MSB is true, the number would become negative after the shift left by 16. Then when ORing it with the highDword, the initial DWORD would be sign-extended to a QWORD, meaning the high DWORD would become all 1s, basically cancelling out the entire OR operation.
Sainan added 1 commit 2025-04-29 04:08:42 -07:00
fix: weapon seed's low dword being sign extended
All checks were successful
Build / build (push) Successful in 1m42s
Build / build (pull_request) Successful in 1m7s
ce37b736b7
JavaScript's semantics here are incredibly stupid, but basically if the initial DWORD's high WORD's MSB is true, the number would become negative after the shift left by 16. Then when ORing it with the highDword, the initial DWORD would be sign-extended to a QWORD, meaning the high DWORD would become all 1s, basically cancelling out the entire OR operation.
Sainan merged commit 9468768947 into main 2025-04-29 12:28:01 -07:00
Sainan deleted branch lodword-fix 2025-04-29 12:28:01 -07:00
Sign in to join this conversation.
No description provided.