Skip to content

Commit a2bb776

Browse files
committedMay 20, 2017
Fix wchar_t type on 605599b
event.KeyInput.Char is a wchar_t, iswprint should be used
1 parent 60baf81 commit a2bb776

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed
 

Diff for: ‎src/guiChatConsole.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -627,9 +627,7 @@ bool GUIChatConsole::OnEvent(const SEvent& event)
627627
bool backwards = event.KeyInput.Shift;
628628
prompt.nickCompletion(names, backwards);
629629
return true;
630-
}
631-
else if(isprint(event.KeyInput.Char) && !event.KeyInput.Control)
632-
{
630+
} else if (iswprint(event.KeyInput.Char) && !event.KeyInput.Control) {
633631
#if defined(__linux__) && (IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR < 9)
634632
wchar_t wc = L'_';
635633
mbtowc( &wc, (char *) &event.KeyInput.Char, sizeof(event.KeyInput.Char) );

1 commit comments

Comments
 (1)

Fixer-007 commented on May 20, 2017

@Fixer-007
Contributor

Fixes regression, interestingly I found just one special symbol on keyboard, that is not working anymore: U+2116 № (Numero Sign). Not a big deal, since it is very rarely used in minetest.

Please sign in to comment.