Archive 17/01/2023.

Don’t understand something in String::DecodeUtf16

graveman

Hello! I thought a lot of time and could not understand why in String::DecodeUTF16 method is it used bitwise “or” operator instead of sum in this code:

Why not return ((word1 & 0x3ff) << 10) | (word2 & 0x3ff) + 0x10000; ?

cadaver

You have uncovered a bug :slight_smile: Thanks!

graveman

Wow, really? I’m glad I could help.