diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-02-03 01:46:29 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-02-03 01:46:29 +0400 |
commit | 4e44b149275a3542a3ff7385455a95b7c2856346 (patch) | |
tree | 0db0802e8fd926e2121ccf697524d76b1e706cee /source | |
parent | 5c9ad8653a99d8a0aa247e63ba25d0291328535e (diff) |
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.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 079833f693f..621e5449223 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -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]) { |