From 58a4eead209e0b2c78903a9fec9f60272f4c4c2f Mon Sep 17 00:00:00 2001 From: Moriyoshi Koizumi Date: Sun, 28 Feb 2010 09:33:05 +0000 Subject: [PATCH] - Merge from upstream (note: this is no behavioral change, so need not to be merged to 5.3.2 branch) --- ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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++; -- 2.40.0