summaryrefslogtreecommitdiff
path: root/src/guiChatConsole.cpp
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-05-20 22:29:15 +0200
committerGitHub <noreply@github.com>2017-05-20 22:29:15 +0200
commit90808a4f34dca379e872074bdfd472faf1c48cf3 (patch)
treec98e0264a2d18f8106d6fde77c49ddb46e467dbf /src/guiChatConsole.cpp
parent358074b2960b369dfd248bd31e08db93e114a4aa (diff)
downloadminetest-90808a4f34dca379e872074bdfd472faf1c48cf3.tar.gz
minetest-90808a4f34dca379e872074bdfd472faf1c48cf3.tar.bz2
minetest-90808a4f34dca379e872074bdfd472faf1c48cf3.zip
Real control fix (#5787)
* Allow enabling and disabling mods. * Re-fix 605599b6f150b89ba6539c4d088231b326adcb48 This breaks some chars like € in chat. Instead verify is char is a non control char -> iswcntrl
Diffstat (limited to 'src/guiChatConsole.cpp')
-rw-r--r--src/guiChatConsole.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/guiChatConsole.cpp b/src/guiChatConsole.cpp
index 8281da861..5bb80bbbe 100644
--- a/src/guiChatConsole.cpp
+++ b/src/guiChatConsole.cpp
@@ -627,7 +627,7 @@ bool GUIChatConsole::OnEvent(const SEvent& event)
bool backwards = event.KeyInput.Shift;
prompt.nickCompletion(names, backwards);
return true;
- } else if (iswprint(event.KeyInput.Char) && !event.KeyInput.Control) {
+ } else if (!iswcntrl(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) );