Fix reading uninitialized buffer

This commit is contained in:
Campbell Barton
2015-05-30 14:48:42 +10:00
parent 1a0c961746
commit 8b494e03be

View File

@@ -1366,7 +1366,7 @@ static int insert_text_invoke(bContext *C, wmOperator *op, const wmEvent *event)
accentcode = 0;
}
else if (event->utf8_buf[0]) {
BLI_strncpy_wchar_from_utf8(inserted_text, event->utf8_buf, 2);
inserted_text[0] = BLI_str_utf8_as_unicode(event->utf8_buf);
ascii = inserted_text[0];
insert_into_textbuf(obedit, ascii);
accentcode = 0;