This is an automated email from the ASF dual-hosted git repository.

kyork pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git


The following commit(s) were added to refs/heads/master by this push:
     new 78db8a6  Some Emoji emotion not Show On Android 9.0 (#1804)
78db8a6 is described below

commit 78db8a66eb5422fa1b09b24f7cf0b60ed5b77bb0
Author: codefurture <gubaoj...@163.com>
AuthorDate: Mon Nov 26 18:53:04 2018 +0800

    Some Emoji emotion not Show On Android 9.0 (#1804)
---
 weex_core/Source/wson/wson_util.cpp | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/weex_core/Source/wson/wson_util.cpp 
b/weex_core/Source/wson/wson_util.cpp
index 75c7aa7..fcfbc2c 100644
--- a/weex_core/Source/wson/wson_util.cpp
+++ b/weex_core/Source/wson/wson_util.cpp
@@ -141,9 +141,8 @@ namespace wson {
         for(int i=0; i<length;){
             u_int16_t c1 = utf16[i++];
             if(isHighSurrogate(c1)){
-                i++;
                 if(i < length){
-                    u_int16_t c2 = utf16[i];
+                    u_int16_t c2 = utf16[i++];
                     if (isLowSurrogate(c2)) {
                         u_int32_t codePoint =  toCodePoint(c1, c2);
                         count += utf16_char_convert_to_utf8_cstr(codePoint, 
src + count);
@@ -167,9 +166,8 @@ namespace wson {
         for(int i=0; i<length;){
             u_int16_t c1 = utf16[i++];
             if(isHighSurrogate(c1)){
-                i++;
                 if(i < length){
-                    u_int16_t c2 = utf16[i];
+                    u_int16_t c2 = utf16[i++];
                     if (isLowSurrogate(c2)) {
                         u_int32_t codePoint =  toCodePoint(c1, c2);
                         count += utf16_char_convert_to_utf8_cstr(codePoint, 
src + count);

Reply via email to