From b78ad28d0eafdeb56dd052717ad0b009ecc15f5e Mon Sep 17 00:00:00 2001 From: Eric House Date: Fri, 24 Jan 2020 21:57:35 -0800 Subject: [PATCH] draw multi-type cell contents correctly As long as it's not too long for the space! But the curses draw function that knows how to measure the length-in-bytes of a multi-byte string doesn't seem to be available to me. So pass -1 as the length and it'll draw correctly out to the NULL terminator. --- xwords4/linux/cursesdraw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xwords4/linux/cursesdraw.c b/xwords4/linux/cursesdraw.c index 9ab8456ad..48b7bbcc7 100644 --- a/xwords4/linux/cursesdraw.c +++ b/xwords4/linux/cursesdraw.c @@ -382,7 +382,7 @@ curses_draw_drawCell( DrawCtx* p_dctx, const XP_Rect* rect, } /* switch */ } - mvwaddnstr( dctx->boardWin, rect->top, rect->left, loc, rect->width ); + mvwaddnstr( dctx->boardWin, rect->top, rect->left, loc, -1 ); if ( highlight ) { wstandend( dctx->boardWin );