From 127bc77497aa166be14987dd895952fd022f7b8a Mon Sep 17 00:00:00 2001 From: Marco Antognini Date: Fri, 30 Oct 2015 08:23:57 +0100 Subject: [PATCH] Fixed encoding of UTF-16 As per http://en.sfml-dev.org/forums/index.php?topic=19223.0 --- include/SFML/System/Utf.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/SFML/System/Utf.inl b/include/SFML/System/Utf.inl index a69ca0782..801ebf571 100644 --- a/include/SFML/System/Utf.inl +++ b/include/SFML/System/Utf.inl @@ -322,7 +322,7 @@ In Utf<16>::decode(In begin, In end, Uint32& output, Uint32 replacement) template 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 if ((input >= 0xD800) && (input <= 0xDFFF))