Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(developer): correct use of u16chr when second parameter could be null #11894

Draft
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

markcsinclair
Copy link
Contributor

Fix the use of u16chr() with *q==0 in u16tok() bug (and anywhere else it is similarly misused) - see issue #11814

Tests for u16chr() and u16tok() (both variants) are included in gtest-kmxu16-test.cpp

Partially fixes: #11814 (another PR is needed for the first bug)

@keymanapp-test-bot skip

@markcsinclair markcsinclair marked this pull request as draft July 1, 2024 10:15
@markcsinclair markcsinclair self-assigned this Jul 1, 2024
@keymanapp-test-bot
Copy link

keymanapp-test-bot bot commented Jul 1, 2024

User Test Results

Test specification and instructions

User tests are not required

Test Artifacts

@mcdurdin
Copy link
Member

mcdurdin commented Jul 2, 2024

I independently encountered the u16tok bug. I have pushed my branch so you can compare: #11910.

@mcdurdin mcdurdin marked this pull request as ready for review July 5, 2024 08:10
@mcdurdin mcdurdin marked this pull request as draft July 5, 2024 08:11
@darcywong00 darcywong00 modified the milestones: A18S5, A18S6 Jul 5, 2024
…e-of-u16chr-when-second-parameter-could-be-null

# Keyman Conventional Commit suggestions:
#
# - Link to a Sentry issue with git trailer:
#     Fixes: _MODULE_-_ID_
# - Give credit to co-authors:
#     Co-authored-by: _Name_ <_email_>
# - Use imperative, present tense ('attach' not 'attaches', 'attached' etc)
# - Don't include a period at the end of the title
# - Always include a blank line before trailers
# - More: https://github.com/keymanapp/keyman/wiki/Pull-Request-and-Commit-workflow-notes
@markcsinclair
Copy link
Contributor Author

markcsinclair commented Jul 11, 2024

I think the tests for u16chr and u16tok (both variants) are complete, so the next task is to identify and correct any additional incorrect uses of u16chr, where second parameter could be null.

Possibilities include:

  • ProcessEthnologueStore() (see here)
  • LineTokenType() (two places, see here)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

bug(developer): incorrect handling of second parameter of index in kmcmplib compiler
3 participants