]> granicus.if.org Git - php/commitdiff
- Merge from upstream (note: this is no behavioral change, so need not to be
authorMoriyoshi Koizumi <moriyoshi@php.net>
Sun, 28 Feb 2010 09:33:05 +0000 (09:33 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Sun, 28 Feb 2010 09:33:05 +0000 (09:33 +0000)
  merged to 5.3.2 branch)

ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c

index 848dbff228bf0a34e8a786c2614da2f318e24b11..eb8949a298b9060d52486d6c9ceeb39a9c2a4137 100644 (file)
@@ -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++;