1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-18 20:10:29 +01:00

Fixed buffer size.

This commit is contained in:
Jeremy Sowden
2019-07-12 23:28:12 +01:00
committed by Carlos R. Mafra
parent 41193bdacd
commit a12f0d453a

View File

@@ -1392,7 +1392,7 @@ void wClipIconPaint(WAppIcon *aicon)
WMColor *color;
Window win = aicon->icon->core->window;
int length, nlength;
char *ws_name, ws_number[10];
char *ws_name, ws_number[sizeof scr->current_workspace * CHAR_BIT / 3 + 1];
int ty, tx;
wIconPaint(aicon->icon);
@@ -1400,7 +1400,7 @@ void wClipIconPaint(WAppIcon *aicon)
length = strlen(workspace->name);
ws_name = wmalloc(length + 1);
snprintf(ws_name, length + 1, "%s", workspace->name);
snprintf(ws_number, sizeof(ws_number), "%i", scr->current_workspace + 1);
snprintf(ws_number, sizeof ws_number, "%u", scr->current_workspace + 1);
nlength = strlen(ws_number);
if (wPreferences.flags.noclip || !workspace->clip->collapsed)