mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 05:18: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:
@@ -557,7 +557,7 @@ aquireManagerSelection(WScreen *scr)
|
||||
XEvent ev;
|
||||
Time timestamp;
|
||||
|
||||
sprintf(buffer, "WM_S%i", scr->screen);
|
||||
snprintf(buffer, sizeof(buffer), "WM_S%i", scr->screen);
|
||||
scr->managerAtom = XInternAtom(dpy, buffer, False);
|
||||
|
||||
/* for race-conditions... */
|
||||
@@ -1015,14 +1015,14 @@ wScreenRestoreState(WScreen *scr)
|
||||
path = wdefaultspathfordomain("WMState");
|
||||
else {
|
||||
char buf[16];
|
||||
sprintf(buf, "WMState.%i", scr->screen);
|
||||
snprintf(buf, sizeof(buf), "WMState.%i", scr->screen);
|
||||
path = wdefaultspathfordomain(buf);
|
||||
}
|
||||
scr->session_state = PLGetProplistWithPath(path);
|
||||
wfree(path);
|
||||
if (!scr->session_state && wScreenCount>1) {
|
||||
char buf[16];
|
||||
sprintf(buf, "WMState.%i", scr->screen);
|
||||
snprintf(buf, sizeof(buf), "WMState.%i", scr->screen);
|
||||
path = wdefaultspathfordomain(buf);
|
||||
scr->session_state = PLGetProplistWithPath(path);
|
||||
wfree(path);
|
||||
@@ -1125,7 +1125,7 @@ wScreenSaveState(WScreen *scr)
|
||||
str = wdefaultspathfordomain("WMState");
|
||||
else {
|
||||
char buf[16];
|
||||
sprintf(buf, "WMState.%i", scr->screen);
|
||||
snprintf(buf, sizeof(buf), "WMState.%i", scr->screen);
|
||||
str = wdefaultspathfordomain(buf);
|
||||
}
|
||||
path = PLMakeString(str);
|
||||
|
||||
Reference in New Issue
Block a user