YorkShen closed pull request #1804: [WEEX-666][Android]Some Emoji emotion not 
Show On Android 9.0
URL: https://github.com/apache/incubator-weex/pull/1804
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/weex_core/Source/wson/wson_util.cpp 
b/weex_core/Source/wson/wson_util.cpp
index 75c7aa7a6b..fcfbc2cdb5 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);


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to