diff options
| author | Masaki Kagaya <masakielastic@gmail.com> | 2015-02-18 23:17:39 +0900 |
|---|---|---|
| committer | Stanislav Malyshev <stas@php.net> | 2015-03-08 23:40:56 -0700 |
| commit | 934d6ed900f3d9dbb94e8d428fd60cf2360d80d4 (patch) | |
| tree | 186afa80dec0e959ee0c13f9c220be451fe5a669 /ext/mbstring/libmbfl | |
| parent | 7d47d9fe23274d750bee90a4d7f2251ebaaa4e1a (diff) | |
| download | php-git-934d6ed900f3d9dbb94e8d428fd60cf2360d80d4.tar.gz | |
added missing parentheses
added test case for bug #68846
replaced tab with space
added missing parentheses again
See also: http://icu-project.org/docs/papers/gb18030.html#h7
Diffstat (limited to 'ext/mbstring/libmbfl')
| -rw-r--r-- | ext/mbstring/libmbfl/filters/mbfilter_gb18030.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c b/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c index f6f12be449..7767c6551f 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c @@ -239,7 +239,7 @@ mbfl_filt_conv_gb18030_wchar(int c, mbfl_convert_filter *filter) if (((c1 >= 0x81 && c1 <= 0x84) || (c1 >= 0x90 && c1 <= 0xe3)) && c2 >= 0x30 && c2 <= 0x39 && c3 >= 0x81 && c3 <= 0xfe && c >= 0x30 && c <= 0x39) { if (c1 >= 0x90 && c1 <= 0xe3) { - w = ((c1 - 0x90)*10 + (c2 - 0x30)*126 + (c3 - 0x81))*10 + (c - 0x30) + 0x10000; + w = ((((c1 - 0x90)*10 + (c2 - 0x30))*126 + (c3 - 0x81)))*10 + (c - 0x30) + 0x10000; } else { /* Unicode BMP */ w = (((c1 - 0x81)*10 + (c2 - 0x30))*126 + (c3 - 0x81))*10 + (c - 0x30); if (w >= 0 && w <= 39419) { |
