Infobar: Fix strncpy mistake.
This commit is contained in:
parent
af0d459b4c
commit
d8afcfa013
@ -194,7 +194,8 @@ infobar_draw_statustext(int sc, char *str)
|
||||
lastst = infobar[sc].statustext;
|
||||
|
||||
infobar[sc].statustext = _strdup(str);
|
||||
strncpy(strwc, str, sizeof(strwc));
|
||||
|
||||
strncpy(strwb, str, sizeof(strwb));
|
||||
|
||||
len = ((strlen(str) > sizeof(strwc)) ? sizeof(strwc) : strlen(str));
|
||||
|
||||
@ -217,6 +218,8 @@ infobar_draw_statustext(int sc, char *str)
|
||||
else
|
||||
strwc[j] = strwb[i];
|
||||
|
||||
printf("--> '%s'\n", strwc);
|
||||
|
||||
/* Draw a first time the statustext for non colorized text */
|
||||
draw_text(infobar[sc].bar->dr, (sgeo[sc].width - SHADH) - textw(strwc),
|
||||
FHINFOBAR, infobar[sc].bar->fg, 0, strwc);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user