mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-22 14:08:06 +01:00
- s/sprintf/snprintf
- updated some po's - fixed crash bug when removing WINDOWS_MENU or WORKSPACE_MENU from rootmenu - some other stuff i forgot
This commit is contained in:
@@ -320,7 +320,7 @@ updateDockNumbers(WScreen *scr)
|
||||
my_v_mask, &my_gc_values);
|
||||
|
||||
ws_numbers = wmalloc(20);
|
||||
sprintf(ws_numbers, "%i [ %i ]", scr->current_workspace+1,
|
||||
snprintf(ws_numbers, 20, "%i [ %i ]", scr->current_workspace+1,
|
||||
((scr->current_workspace/10)+1));
|
||||
length = strlen(ws_numbers);
|
||||
|
||||
@@ -457,14 +457,14 @@ wAppIconPaint(WAppIcon *aicon)
|
||||
if (index > 0) {
|
||||
char buf[16];
|
||||
|
||||
sprintf(buf, "%i", index);
|
||||
snprintf(buf, sizeof(buf), "%i", index);
|
||||
|
||||
WMDrawString(scr->wmscreen, aicon->icon->core->window,
|
||||
scr->clip_title_gc, scr->title_font,
|
||||
1, 1, buf, strlen(buf));
|
||||
3, 3, buf, strlen(buf));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (aicon->omnipresent)
|
||||
drawCorner(aicon->icon);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user