Fix wchar_t type on 605599b6f150b89ba6539c4d088231b326adcb48
authorLoic Blot <loic.blot@unix-experience.fr>
Sat, 20 May 2017 18:13:29 +0000 (20:13 +0200)
committerLoic Blot <loic.blot@unix-experience.fr>
Sat, 20 May 2017 18:13:29 +0000 (20:13 +0200)
event.KeyInput.Char is a wchar_t, iswprint should be used

src/guiChatConsole.cpp

index 4af1caa80c75e7fb486d60a190e1d93408af928e..8281da86101d92beec11e86257454c13f943b687 100644 (file)
@@ -627,9 +627,7 @@ bool GUIChatConsole::OnEvent(const SEvent& event)
                        bool backwards = event.KeyInput.Shift;
                        prompt.nickCompletion(names, backwards);
                        return true;
-               }
-               else if(isprint(event.KeyInput.Char) && !event.KeyInput.Control)
-               {
+               } else if (iswprint(event.KeyInput.Char) && !event.KeyInput.Control) {
                        #if defined(__linux__) && (IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR < 9)
                                wchar_t wc = L'_';
                                mbtowc( &wc, (char *) &event.KeyInput.Char, sizeof(event.KeyInput.Char) );