diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-05-13 08:07:17 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-05-13 08:07:17 +0000 |
commit | ef3e39313c7668d73fcc46337301489836ad537d (patch) | |
tree | 9ffbdd45d70ab2c8a2f932487637635e80a96c92 /Build/source/texk/mendexk/fread.c | |
parent | 9107aa935060bd561dd6a02c20de4ba18ff3a764 (diff) |
texk/mendexk: Avoid ambiguous operation
git-svn-id: svn://tug.org/texlive/trunk@34003 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/mendexk/fread.c')
-rw-r--r-- | Build/source/texk/mendexk/fread.c | 11 |
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)--; |