summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2014-05-13 08:07:17 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2014-05-13 08:07:17 +0000
commitef3e39313c7668d73fcc46337301489836ad537d (patch)
tree9ffbdd45d70ab2c8a2f932487637635e80a96c92 /Build/source
parent9107aa935060bd561dd6a02c20de4ba18ff3a764 (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')
-rw-r--r--Build/source/texk/mendexk/ChangeLog4
-rw-r--r--Build/source/texk/mendexk/fread.c11
2 files changed, 7 insertions, 8 deletions
diff --git a/Build/source/texk/mendexk/ChangeLog b/Build/source/texk/mendexk/ChangeLog
index 3f36acc692c..7782fc84f0c 100644
--- a/Build/source/texk/mendexk/ChangeLog
+++ b/Build/source/texk/mendexk/ChangeLog
@@ -1,3 +1,7 @@
+2014-05-13 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * fread.c (copy_multibyte_char): Avoid ambiguous operation.
+
2014-05-13 TANAKA Takuji <KXD02663@nifty.ne.jp>
* fread.c: Add copy_multibyte_char() to
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)--;