fix(developer): handle leading delimiters correctly in u16tok() - #16446
Merged
mcdurdin merged 2 commits intoSep 1, 2026
Merged
Conversation
User Test ResultsTest specification and instructions User tests are not required Test Artifacts
|
A string with leading delimiters passed into `u16tok()` would not skip those delimiters. This impacted `&targets` store and other locations. Note that this tightens input parameter checks for delimiters and context as well. Fixes: #13721 Test-bot: skip
mcdurdin
force-pushed
the
fix/developer/13721-u16tok-targets-store-leading-whitespace
branch
from
August 27, 2026 09:15
86b58d5 to
babb473
Compare
mcdurdin
marked this pull request as ready for review
August 27, 2026 10:11
u16tok()u16tok()
SabineSIL
approved these changes
Aug 28, 2026
SabineSIL
left a comment
Contributor
There was a problem hiding this comment.
LGTM except for a parameter name in function description
Comment on lines
+1338
to
+1343
| * same length or shorter. | ||
| * @param sp store value to rewrite | ||
| * @param targets (output) | ||
| * @return FALSE if no targets found or invalid targets found | ||
| */ | ||
| KMX_BOOL GetCompileTargetsFromTargetsStore(KMX_WCHAR *store, int &targets) { |
Contributor
There was a problem hiding this comment.
param store instead of param sp?
| const result = await compileTestKeyboard(callbacks, ['keyboards', 'targets-with-whitespace.kmn']); | ||
| assert.isNotNull(result); | ||
|
|
||
| // Verifies that targets has 'any' as it contains both JS and KMX targets |
Contributor
There was a problem hiding this comment.
I find having this comment here a bit confusing since the next block of lines doesn't deal neither with targets nor with any. Would it make more sense to put it before line 155 (const reader = new KmxFileReader();)?
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com> Co-authored-by: Sabine Schmitt <SabineSIL@users.noreply.github.com>
ermshiperete
approved these changes
Aug 31, 2026
mcdurdin
deleted the
fix/developer/13721-u16tok-targets-store-leading-whitespace
branch
September 1, 2026 05:27
Collaborator
|
Changes in this pull request will be available for download in Keyman version 19.0.277-alpha |
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.
A string with leading delimiters passed into
u16tok()would not skip those delimiters. This impacted&targetsstore and other locations.Note that this tightens input parameter checks for delimiters and context as well.
Fixes: #13721
Test-bot: skip