--- a/gntwm.c Thu Oct 03 06:13:03 2019 -0500
+++ b/gntwm.c Thu Oct 03 06:35:19 2019 -0500
@@ -216,7 +216,6 @@
while ((panel = panel_below(panel)) != NULL) {
int sx, ex, sy, ey, w, y;
sx = getbegx(panel_window(panel));
@@ -232,6 +231,8 @@
ex < getbegx(panel_window(below)))
for (y = MAX(sy, getbegy(panel_window(below))); y <= MIN(ey, getbegy(panel_window(below)) + getmaxy(panel_window(below))); y++) {
+ memset(&ch, 0, sizeof(ch)); if (mvwin_wch(panel_window(below), y - getbegy(panel_window(below)), sx - 1 - getbegx(panel_window(below)), &ch) != OK)
w = widestringwidth(ch.chars);
@@ -826,6 +827,7 @@
+ memset(&wch, 0, sizeof(wch)); mvwin_wch(curscr, y, x, &wch);
ch[0] = (char)(wch.chars[0] & 0xff);
@@ -1079,15 +1081,21 @@
widestringwidth(wchar_t *wide)
len = wcstombs(NULL, wide, 0) + 1;
- string = g_new0(char, len);
- wcstombs(string, wide, len);
- ret = string ? gnt_util_onscreen_width(string, NULL) : 1;
+ str = g_new0(char, len); + wcstombs(str, wide, len); + ret = gnt_util_onscreen_width(str, NULL);