diff --git a/Core/GDCore/Project/Project.cpp b/Core/GDCore/Project/Project.cpp index d96b48f74c63..105bad66947c 100644 --- a/Core/GDCore/Project/Project.cpp +++ b/Core/GDCore/Project/Project.cpp @@ -1157,8 +1157,6 @@ void Project::SerializeTo(SerializerElement& element) const { // end of compatibility code extensionProperties.SerializeTo(propElement.AddChild("extensionProperties")); - - playableDevicesElement.AddChild("").SetStringValue("mobile"); SerializerElement& platformsElement = propElement.AddChild("platforms"); platformsElement.ConsiderAsArrayOf("platform"); diff --git a/Core/GDCore/String.cpp b/Core/GDCore/String.cpp index f97d23400459..6bc8fd12f7f8 100644 --- a/Core/GDCore/String.cpp +++ b/Core/GDCore/String.cpp @@ -433,18 +433,27 @@ String& String::Normalize(String::NormForm form) { unsigned char *newStr = nullptr; - if(form == NFD) + switch (form) { + case NFD: newStr = utf8proc_NFD((unsigned char*)m_string.c_str()); - else if(form == NFC) + break; + case NFC: newStr = utf8proc_NFC((unsigned char*)m_string.c_str()); - else if(form == NFKD) + break; + case NFKD: newStr = utf8proc_NFKD((unsigned char*)m_string.c_str()); - else if(form == NFKC) + break; + case NFKC: newStr = utf8proc_NFKC((unsigned char*)m_string.c_str()); + break; + default: + return *this; + } - m_string = (char*)newStr; - - free(newStr); + if (newStr != nullptr) { + m_string = (char*)newStr; + free(newStr); + } return *this; }