You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error(
"%d encountered at index %.0f. %s.",
"Internal Error: unexpected encoding ", type,
(double) i + 1,
"Contact maintainer"
);
which has three format specifiers, and four additional arguments.
This should probably be changed to:
error(
"Internal Error: unexpected encoding %d encountered at index %.0f. %s.",
type,
(double) i + 1,
"Contact maintainer"
);
I discovered this due to a bug in the TERR engine, where getCharCE
produced an incorrect character encoding, leading to a call to this
'error' code, which generated a segfault. This code would probably
never be called in R, but it is worth fixing just in case.
The text was updated successfully, but these errors were encountered:
Nice find. Do you have a link to the TERR bug? Based on my use of 'nocov' around that section of code I must have thought at the time it was hard to generate a test case that would hit that point in the code.
No, there isn't an publicly visible link to the TERR bug. Part of the bug (now fixed) was that TERR was returning a bad value from getCharCE, which caused it to hit this point in the fansi code.
This is now fixed in the development branch. Thanks for reporting. I'll say though I can't quite figure out how TERR managed to generate borked encoding types given that the mkChar* functions validate the type.
Either way, I should have tested this code rather than assumed it was unreachable.
FANSI_check_enc contains the code:
which has three format specifiers, and four additional arguments.
This should probably be changed to:
I discovered this due to a bug in the TERR engine, where getCharCE
produced an incorrect character encoding, leading to a call to this
'error' code, which generated a segfault. This code would probably
never be called in R, but it is worth fixing just in case.
The text was updated successfully, but these errors were encountered: