-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
bug(core): Keyman Core has an off-by-one error for nul ... > context(n)
#13304
Comments
nul ... > context(n)
nul ... > context(n)
mcdurdin
added a commit
that referenced
this issue
Feb 21, 2025
Add 4 test keyboards to validate `nul` and `if` used in conjunction with `index` and `context` and corresponding references in core unit tests. Add a script to rebuild baseline keyboards using a copy of kmcomp.exe 16.0.138; this is setup and tested only on Windows (YMMV on WINE, etc). Add the 4 additional baseline test keyboards to kmcmplib unit tests for build consistency between kmcomp 16 and kmcmplib 18 (all pass). Note: two of the new Core tests currently fail. This is expected, see issue #13304. Fixes: #13303
mcdurdin
added a commit
that referenced
this issue
Feb 21, 2025
Two separate bugs addressed, with `index()` references and with `context()` references -- both have the same root cause, of not taking `nul` at the start of the context into account (as `nul` is not included in the `m_miniContext` member, being a non-character). We already fixed this issue for `if()` quite a long time ago, and some of the same patterns can be with `m_miniContextIfLen` for example. Fixes: #13304
mcdurdin
added a commit
that referenced
this issue
Feb 21, 2025
Two separate bugs addressed, with `index()` references and with `context()` references -- both have the same root cause, of not taking `nul` at the start of the context into account (as `nul` is not included in the `m_miniContext` member, being a non-character). We already fixed this issue for `if()` quite a long time ago, and some of the same patterns can be with `m_miniContextIfLen` for example. Fixes: #13304 Fixes: #13316
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It looks like handling is correct for
if()
but not fornul
(but this needs to be verified)(verified,if()
is working correctly, see tests in #13311)See related issue on documentation which documented this anomalous behaviour as 'correct':
context()
andindex()
docs to remove caveat aroundcontext(n)
offset help.keyman.com#1888The text was updated successfully, but these errors were encountered: