Skip to content

Commit

Permalink
Fix iconv() substitution at the end of input (amends 87228).
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@87229 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
kalibera committed Oct 14, 2024
1 parent 9442eee commit 371066d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/sysutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ attribute_hidden SEXP do_iconv(SEXP call, SEXP op, SEXP args, SEXP env)
else
inp_unit_size = 1;
}
for(int i = 0; i < inp_unit_size; i++) {
for(int i = 0; i < inp_unit_size && inb > 0; i++) {
if(strcmp(sub, "byte") == 0) {
if(outb < 5) {
R_AllocStringBuffer(2*cbuff.bufsize, &cbuff);
Expand Down

0 comments on commit 371066d

Please sign in to comment.