Fixed encoding of UTF-16

As per http://en.sfml-dev.org/forums/index.php?topic=19223.0
This commit is contained in:
Marco Antognini 2015-10-30 08:23:57 +01:00 committed by Lukas Dürrenberger
parent 9c5c750e60
commit 127bc77497

View File

@ -322,7 +322,7 @@ In Utf<16>::decode(In begin, In end, Uint32& output, Uint32 replacement)
template <typename Out> template <typename Out>
Out Utf<16>::encode(Uint32 input, Out output, Uint16 replacement) Out Utf<16>::encode(Uint32 input, Out output, Uint16 replacement)
{ {
if (input < 0xFFFF) if (input <= 0xFFFF)
{ {
// The character can be copied directly, we just need to check if it's in the valid range // The character can be copied directly, we just need to check if it's in the valid range
if ((input >= 0xD800) && (input <= 0xDFFF)) if ((input >= 0xD800) && (input <= 0xDFFF))