summaryrefslogtreecommitdiff
path: root/ext/mbstring
diff options
context:
space:
mode:
authorMoriyoshi Koizumi <moriyoshi@php.net>2010-02-28 09:33:05 +0000
committerMoriyoshi Koizumi <moriyoshi@php.net>2010-02-28 09:33:05 +0000
commit24829e8d4e1074f8936659095a87fe10207f6473 (patch)
tree9bc85cd3c6a521777419ccbfabbbeeefeb98a453 /ext/mbstring
parent817ab0c34debeaafbaf5d82014904400aa82d88e (diff)
downloadphp-git-24829e8d4e1074f8936659095a87fe10207f6473.tar.gz
- Merge from upstream (note: this is no behavioral change, so need not to be
merged to 5.3.2 branch)
Diffstat (limited to 'ext/mbstring')
-rw-r--r--ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c
index 848dbff228..eb8949a298 100644
--- a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c
+++ b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c
@@ -327,8 +327,10 @@ mbfl_filt_conv_wchar_eucjpwin(int c, mbfl_convert_filter *filter)
c1 = 0;
c2 = cp932ext1_ucs_table_max - cp932ext1_ucs_table_min;
while (c1 < c2) { /* CP932 vendor ext1 (13ku) */
+ const int oh = cp932ext1_ucs_table_min / 94;
+
if (c == cp932ext1_ucs_table[c1]) {
- s1 = ((c1/94 + 0x2d) << 8) + (c1%94 + 0x21);
+ s1 = ((c1 / 94 + oh + 0x21) << 8) + (c1 % 94 + 0x21);
break;
}
c1++;