fix for own mistake r41192
authorCampbell Barton <ideasman42@gmail.com>
Sun, 23 Oct 2011 01:06:38 +0000 (01:06 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 23 Oct 2011 01:06:38 +0000 (01:06 +0000)
source/blender/windowmanager/intern/wm_event_system.c

index c798b284c7bd9cc6833d312c194af516d8952a31..3e9bce651a8bc445bd61fc705adee60a98ba8f9d 100644 (file)
@@ -2616,9 +2616,7 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U
                        
                        /* exclude arrow keys, esc, etc from text input */
                        if(type==GHOST_kEventKeyUp) {
-                               if (event.ascii<32 && event.ascii > 0) {
-                                       event.ascii= '\0';
-                               }
+                               event.ascii= '\0';
 
                                /* ghost should do this already for key up */
                                if (event.utf8_buf[0]) {
@@ -2626,6 +2624,10 @@ 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 */
+                       }
 
                        /* modifiers */
                        /* assigning both first and second is strange - campbell */