mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-06 03:20:26 +00:00
ncdirect_vprintf_aligned(): use ncstrwidth() for width #1074
This commit is contained in:
parent
9468b5965c
commit
8f906920a8
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user