ncdirect_vprintf_aligned(): use ncstrwidth() for width #1074

This commit is contained in:
nick black 2020-10-19 09:34:01 -04:00 committed by Nick Black
parent 9468b5965c
commit 8f906920a8

View File

@ -491,7 +491,7 @@ int ncdirect_vprintf_aligned(ncdirect* n, int y, ncalign_e align, const char* fm
if(r == nullptr){ if(r == nullptr){
return -1; return -1;
} }
const size_t len = strlen(r); const size_t len = ncstrwidth(r);
const int x = ncdirect_align(n, align, len); const int x = ncdirect_align(n, align, len);
if(ncdirect_cursor_move_yx(n, y, x)){ if(ncdirect_cursor_move_yx(n, y, x)){
free(r); free(r);