瀏覽代碼

Fix bug in String::DecodeUTF16. Thanks graveman!

Lasse Öörni 10 年之前
父節點
當前提交
04f46f9abc
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Source/Urho3D/Container/Str.cpp

+ 1 - 1
Source/Urho3D/Container/Str.cpp

@@ -1036,7 +1036,7 @@ unsigned String::DecodeUTF16(const wchar_t*& src)
             return '?';
         }
         else
-            return ((word1 & 0x3ff) << 10) | (word2 & 0x3ff) | 0x10000;
+            return (((word1 & 0x3ff) << 10) | (word2 & 0x3ff)) + 0x10000;
     }
 }
 #endif