summaryrefslogtreecommitdiff
path: root/Build/source/texk/mendexk/fread.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/mendexk/fread.c')
-rw-r--r--Build/source/texk/mendexk/fread.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/Build/source/texk/mendexk/fread.c b/Build/source/texk/mendexk/fread.c
index 56dd8419ce5..7c624083361 100644
--- a/Build/source/texk/mendexk/fread.c
+++ b/Build/source/texk/mendexk/fread.c
@@ -438,10 +438,7 @@ static void copy_multibyte_char(char *buff1, char *buff2, int *i, int *j)
int len;
if ((unsigned char)buff1[*i]<0x80) {
- if (j!=NULL)
- buff2[*j]=buff1[*i];
- else
- buff2[*i]=buff1[*i];
+ buff2[j ? *j : *i] = buff1[*i];
return;
}
len = multibytelen((unsigned char)buff1[*i]);
@@ -450,10 +447,8 @@ static void copy_multibyte_char(char *buff1, char *buff2, int *i, int *j)
len=1; /* copy one byte when illegal lead byte */
}
while(len--) {
- if (j!=NULL)
- buff2[(*j)++]=buff1[(*i)++];
- else
- buff2[(*i)++]=buff1[(*i)];
+ buff2[j ? (*j)++ : *i] = buff1[*i];
+ (*i)++;
}
if (j!=NULL) (*j)--;
(*i)--;