- fix for error with utf8 textinput for buttons
[blender.git] / source / blender / windowmanager / WM_types.h
index 5048166c8b7cfd04c127adbaf8b74ca97084a946..fc96c8804b2e04f7fc0646b01292fdb7f57a9807 100644 (file)
@@ -346,7 +346,9 @@ typedef struct wmEvent {
        short val;                      /* press, release, scrollvalue */
        int x, y;                       /* mouse pointer position, screen coord */
        int mval[2];            /* region mouse position, name convention pre 2.5 :) */
-       char utf8_buf[6];       /* from, ghost if utf8 is enabled for the platform */
+       char utf8_buf[6];       /* from, ghost if utf8 is enabled for the platform,
+                                                * BLI_str_utf8_size() must _always_ be valid, check
+                                                * when assigning s we dont need to check on every access after */
        char ascii;                     /* from ghost, fallback if utf8 isnt set */
        char pad;