diff options
author | Rui Hirokawa <hirokawa@php.net> | 2002-12-11 14:41:09 +0000 |
---|---|---|
committer | Rui Hirokawa <hirokawa@php.net> | 2002-12-11 14:41:09 +0000 |
commit | 51b63d6b5ae70e9fc684c77678b13b06514c86f3 (patch) | |
tree | e778143e0e72a539f1e8b4117e7fd0a19fe1c9c1 | |
parent | 6003d9ad36f44c85a2f7b3873f6229a869456ad7 (diff) | |
download | php-git-51b63d6b5ae70e9fc684c77678b13b06514c86f3.tar.gz |
fixed lack of variable initialization bug.
-rw-r--r-- | ext/mbstring/mbfilter_kr.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/mbstring/mbfilter_kr.c b/ext/mbstring/mbfilter_kr.c index f5d2ca4c98..3a2f96a151 100644 --- a/ext/mbstring/mbfilter_kr.c +++ b/ext/mbstring/mbfilter_kr.c @@ -373,7 +373,7 @@ mbfl_filt_conv_wchar_2022kr(int c, mbfl_convert_filter *filter TSRMLS_DC) int mbfl_filt_conv_uhc_wchar(int c, mbfl_convert_filter *filter TSRMLS_DC) { - int c1, w, flag; + int c1, w, flag = 0; switch (filter->status) { case 0: @@ -396,6 +396,7 @@ mbfl_filt_conv_uhc_wchar(int c, mbfl_convert_filter *filter TSRMLS_DC) if ( c1 >= 0x81 && c1 <= 0xa0){ w = (c1 - 0x81)*190 + (c - 0x41); if (w >= 0 && w < uhc1_ucs_table_size) { + flag = 1; w = uhc1_ucs_table[w]; } else { w = 0; @@ -403,6 +404,7 @@ mbfl_filt_conv_uhc_wchar(int c, mbfl_convert_filter *filter TSRMLS_DC) } else if ( c1 >= 0xa1 && c1 <= 0xc6){ w = (c1 - 0xa1)*190 + (c - 0x41); if (w >= 0 && w < uhc2_ucs_table_size) { + flag = 2; w = uhc2_ucs_table[w]; } else { w = 0; @@ -410,6 +412,7 @@ mbfl_filt_conv_uhc_wchar(int c, mbfl_convert_filter *filter TSRMLS_DC) } else if ( c1 >= 0xc7 && c1 <= 0xfe){ w = (c1 - 0xc7)*94 + (c - 0xa1); if (w >= 0 && w < uhc3_ucs_table_size) { + flag = 3; w = uhc3_ucs_table[w]; } else { w = 0; |