-
Notifications
You must be signed in to change notification settings - Fork 4
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
Nightly build broken: Invalid Mode Parameter for Liblouis > 3.7 #51
Comments
@reiner-dolp sorry about that. I thought I was clever. I pushed a fix for the worst problem to master. Now the mode can be 0 again. However I guess also bitwise combinations should be allowed. I don't see how this could be achieved with my code atm. |
Oh I didn't think about that either. What about the following? int isValidMode(int mode) {
for (int i = 0; i < (sizeof(validTranslationModes) / sizeof(*validTranslationModes)); i++)
mode &= ~validTranslationModes[i];
return !mode;
} By the way shouldn't |
Thanks @bertfrees for that code.
What is the effect of that? |
Fixed in liblouis/liblouis@c0820bc (hopefully) |
Because now it is extern? |
Ok, should be static now |
Since 4 days ago (commit liblouis/liblouis#08084a6 ), passing 0 as mode parameter to
lou_translateString
gives:According to the docs
The docs seem wrong, since the
_lou_isValidMode
is expecting exactly one enum variant to be set:@egli So, am I completely misunderstanding what this code is supposed to do or should
_lou_isValidMode
be rewritten to accept a bitwise combination of translation modes? Has0
always been an invalid value?The text was updated successfully, but these errors were encountered: