fix for error utf8 printing input.
authorCampbell Barton <ideasman42@gmail.com>
Mon, 24 Oct 2011 10:11:47 +0000 (10:11 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 24 Oct 2011 10:11:47 +0000 (10:11 +0000)
source/blender/editors/interface/interface_handlers.c

index 99972f2..9d8e2f3 100644 (file)
@@ -1953,7 +1953,7 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
 
                        if(event->utf8_buf[0]) {
                                /* keep this printf until utf8 is well tested */
-                               printf("%s: utf8 char '%s'\n", __func__, event->utf8_buf);
+                               printf("%s: utf8 char '%.*s'\n", __func__, BLI_str_utf8_size(event->utf8_buf), event->utf8_buf);
                                // strcpy(event->utf8_buf, "12345");
                                changed= ui_textedit_type_buf(but, data, event->utf8_buf, BLI_str_utf8_size(event->utf8_buf));
                        }