User Interface: error in own recent commit, replacing loop with memset

This commit is contained in:
Campbell Barton 2013-12-03 09:10:55 +11:00
parent 93b24b91a9
commit a169a109e5
1 changed files with 2 additions and 2 deletions

View File

@ -1604,7 +1604,7 @@ void ui_button_text_password_hide(char password_str[UI_MAX_DRAW_STR], uiBut *but
}
else {
/* convert text to hidden test using asterisks (e.g. pass -> ****) */
int i, len = BLI_strlen_utf8(but->drawstr);
const size_t len = BLI_strlen_utf8(but->drawstr);
/* remap cursor positions */
if (but->pos >= 0) {
@ -1617,7 +1617,7 @@ void ui_button_text_password_hide(char password_str[UI_MAX_DRAW_STR], uiBut *but
BLI_strncpy(password_str, but->drawstr, UI_MAX_DRAW_STR);
memset(but->drawstr, '*', len);
but->drawstr[i] = '\0';
but->drawstr[len] = '\0';
}
}