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

Small fix: in RMLVO, use variant_idx to index variants instead of layout_idx #475

Merged
merged 1 commit into from
Mar 23, 2024

Conversation

wysiwys
Copy link
Contributor

@wysiwys wysiwys commented Mar 23, 2024

This pull request modifies a line of code in xkbcomp/rules.c , in which the mapping.layout_idx was used to index the rmlvo.variants.

Is it correct that instead, mapping.variant_idx should be used here?

Thanks

Copy link
Member

@bluetech bluetech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I think we never noticed this because the variant index virtually always is the same as the layout index. Now I'm curious how you discovered this bug :)

@bluetech bluetech merged commit d455e80 into xkbcommon:master Mar 23, 2024
4 checks passed
@wysiwys
Copy link
Contributor Author

wysiwys commented Mar 24, 2024

No problem! Actually I didn't find the bug from using the API, just saw it while looking at the code, with the goal of understanding RMLVO.

wismill pushed a commit to wismill/libxkbcommon that referenced this pull request Dec 16, 2024
We accidentally ignored the variant index and used the layout index instead.
In realistic rules they are always the same but don't have to be.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants