diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2019-03-06 09:08:51 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2019-03-06 09:08:51 +0000 |
commit | ae5d0496ca88318425661f57ee0c9b8e0a8f4aac (patch) | |
tree | dbf38b8391b051363f2ee3cdaccc278e8d03b6a8 /Build/source/texk | |
parent | a5d2ce0c7d6c8df9d20973b1959b8baf55047367 (diff) |
Check error status for every call of u_strFromUTF8WithSub() (H. Yamashita)
git-svn-id: svn://tug.org/texlive/trunk@50253 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r-- | Build/source/texk/bibtex-x/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/bibtex-x/bibtex-2.c | 12 |
2 files changed, 12 insertions, 5 deletions
diff --git a/Build/source/texk/bibtex-x/ChangeLog b/Build/source/texk/bibtex-x/ChangeLog index b38febb3387..7efbf111826 100644 --- a/Build/source/texk/bibtex-x/ChangeLog +++ b/Build/source/texk/bibtex-x/ChangeLog @@ -1,3 +1,8 @@ +2019-03-06 Hironobu Yamashita <h.y.acetaminophen@gmail.com> + + * bibtex-2.c: Check error status for every call of + u_strFromUTF8WithSub(). + 2019-03-05 Akira Kakuto <kakuto@w32tex.org> * bibtex-2.c: Use u_strFromUTF8WithSub() with a substitution diff --git a/Build/source/texk/bibtex-x/bibtex-2.c b/Build/source/texk/bibtex-x/bibtex-2.c index fb17751de3b..2fad5ab2dfc 100644 --- a/Build/source/texk/bibtex-x/bibtex-2.c +++ b/Build/source/texk/bibtex-x/bibtex-2.c @@ -2966,6 +2966,7 @@ icu_toUChars() seems not working here, using u_strFromUTF8 instead. (04/mar/2019 /* Use u_strFromUTF8WithSub() with a substitution character 0xfffd, instead of u_strFromUTF8(). (05/mar/2019) +If err1 != U_ZERO_ERROR, the original functions are used. (06/mar/2019) */ /* @@ -2973,14 +2974,15 @@ instead of u_strFromUTF8(). (05/mar/2019) uchlen2 = icu_toUChars(entry_strs, (ptr2 * (ENT_STR_SIZE+1)), lenk2, uch2, ucap); */ u_strFromUTF8WithSub(uch1, ucap, &uchlen1, (char *)&ENTRY_STRS(ptr1, 0), lenk1, 0xfffd, NULL, &err1); - u_strFromUTF8WithSub(uch2, ucap, &uchlen2, (char *)&ENTRY_STRS(ptr2, 0), lenk2, 0xfffd, NULL, &err1); - -/* - If err1 != U_ZERO_ERROR, we use the original functions. -*/ if (!U_SUCCESS(err1)) { uchlen1 = icu_toUChars(entry_strs, (ptr1 * (ENT_STR_SIZE+1)), lenk1, uch1, ucap); + err1 = U_ZERO_ERROR; + } + + u_strFromUTF8WithSub(uch2, ucap, &uchlen2, (char *)&ENTRY_STRS(ptr2, 0), lenk2, 0xfffd, NULL, &err1); + + if (!U_SUCCESS(err1)) { uchlen2 = icu_toUChars(entry_strs, (ptr2 * (ENT_STR_SIZE+1)), lenk2, uch2, ucap); err1 = U_ZERO_ERROR; } |