Fix restype of CancellableSendMessage#19862
Merged
SaschaCowley merged 1 commit intobetafrom Mar 30, 2026
Merged
Conversation
seanbudd
approved these changes
Mar 29, 2026
Member
|
Should this target beta? |
Member
Author
Yep, thanks for catching that |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
May fix #19729
Summary of the issue:
nvdaHelper/local/nvdaHelperLocal.cpp, the return type ofcancellableSendMessageTimeoutisLRESULT.LRESULTis defined as__int64on 64-bit Windows, andlongon 32-bit Windows. That is,LRESULTis the signed machine-word-sized integer type.source/NVDAHelper/localLib.py, its return type was set toc_int. That is, the signed 32-bit integer type.ScintillaTextInfousescancellableSendMessageTimeoutwhen getting the text offset from point. Since the the return type is signed, very large (but still positive 64-bit two's compliment) integers may be interpreted as negative due to being truncated.Description of user facing changes:
Unknown, but may fix a crash in Notepad++ (and potentially other cases)
Description of developer facing changes:
NVDAHelper.localLib.cancellableSendMessageTimeout.restypeis nowc_longlongDescription of development approach:
Defined
LRESULTasc_ssize_t(c_longon 32-bit;c_longlongon 64-bit), and setNVDAHelper.localLib.cancellableSendMessageTimeout'srestypetoLRESULT.Testing strategy:
Ran from source and did normal work.
I don't think this has the potential to cause issues, unless we introduced code relying on the incorrect restype during the 64-bit migration, as the return type was fine on 32-bit builds (
c_int is c_long).Known issues with pull request:
None
Code Review Checklist: