Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #4057 (weird Shift behavior) #4074

Closed
wants to merge 1 commit into from

Conversation

neoascetic
Copy link
Contributor

I don't know if this internally more Irrlicht's problem, but I find nothing bad in using isprint instead of != 0.

What about special symbols in the console: it definitely Irrlicht's issue and I've created patch request for it. Hope it will be merged soon.

I don't know if this internally more Irrlicht's problem, but I find
nothing bad in using `isprint` instead of `!= 0`.

What about special symbols in console: it definitely Irrlicht's issue
and I've created [patch request](https://sourceforge.net/p/irrlicht/patches/313/) for it.
Hope it will be merged soon.
@neoascetic
Copy link
Contributor Author

Any thoughts?

@paramat paramat added the Bugfix 🐛 PRs that fix a bug label Jul 3, 2016
@@ -611,7 +611,7 @@ bool GUIChatConsole::OnEvent(const SEvent& event)
prompt.nickCompletion(names, backwards);
return true;
}
else if(event.KeyInput.Char != 0 && !event.KeyInput.Control)
else if(isprint(event.KeyInput.Char) && !event.KeyInput.Control)
Copy link
Contributor

@Zeno- Zeno- Jul 3, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder which header is already including <ctype.h>

Anyhow, I don't really understand what this and the following lines with the casts are actually doing (not what you added, what's already there). 'KeyInput.Char' is of type 'wchar_t' isn't it? So, a) I don't know if isprint() is really meant to be used with something that's wchar_t; and b) I don't know what the lines below are doing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like it's converting event.KeyInput.Char (which isn't a real wchar_t apparently) from UTF-8 to a codepoint.

@neoascetic
Copy link
Contributor Author

Bump, just because why not?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix 🐛 PRs that fix a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants