Fix #30043: typing ctrl+Z in text field adds a square. For ascii these control

characters were already filtered out, do the same now for utf-8.
This commit is contained in:
Brecht Van Lommel
2012-02-02 21:46:29 +00:00
parent 5c9ad8653a
commit 4e44b14927

View File

@@ -2684,9 +2684,11 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U
}
event.utf8_buf[0]= '\0';
}
else if (event.ascii<32 && event.ascii > 0) {
event.ascii= '\0';
/* TODO. should this also zero utf8?, dont for now, campbell */
else {
if (event.ascii<32 && event.ascii > 0)
event.ascii= '\0';
if (event.utf8_buf[0]<32 && event.utf8_buf[0] > 0)
event.utf8_buf[0]= '\0';
}
if (event.utf8_buf[0]) {