Browse Source

Fix bug in String::DecodeUTF16. Thanks graveman!

Lasse Öörni 10 years ago
parent
commit
04f46f9abc
1 changed files with 1 additions and 1 deletions
  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 '?';
             return '?';
         }
         }
         else
         else
-            return ((word1 & 0x3ff) << 10) | (word2 & 0x3ff) | 0x10000;
+            return (((word1 & 0x3ff) << 10) | (word2 & 0x3ff)) + 0x10000;
     }
     }
 }
 }
 #endif
 #endif