diff options
| author | Anselm R Garbe <garbeam@gmail.com> | 2009-07-09 11:21:06 +0100 |
|---|---|---|
| committer | Anselm R Garbe <garbeam@gmail.com> | 2009-07-09 11:21:06 +0100 |
| commit | 5e408d8ff65c8609898ad792cdeeac443f28be7a (patch) | |
| tree | 60a7e9146ae865e7381c2af2f34f7a9346f7033b /dwm.c | |
| parent | introducing const where it might make some sense (diff) | |
| download | dwm-5e408d8ff65c8609898ad792cdeeac443f28be7a.tar.gz dwm-5e408d8ff65c8609898ad792cdeeac443f28be7a.zip | |
restricting number of mons by length of monsyms
Diffstat (limited to 'dwm.c')
| -rw-r--r-- | dwm.c | 2 |
1 files changed, 2 insertions, 0 deletions
| @@ -1690,6 +1690,8 @@ updategeom(void) { | |||
| 1690 | if(XineramaIsActive(dpy)) | 1690 | if(XineramaIsActive(dpy)) |
| 1691 | info = XineramaQueryScreens(dpy, &n); | 1691 | info = XineramaQueryScreens(dpy, &n); |
| 1692 | #endif /* XINERAMA */ | 1692 | #endif /* XINERAMA */ |
| 1693 | if(n > LENGTH(monsyms)) | ||
| 1694 | n = LENGTH(monsyms); | ||
| 1693 | /* allocate monitor(s) for the new geometry setup */ | 1695 | /* allocate monitor(s) for the new geometry setup */ |
| 1694 | for(i = 0; i < n; i++) { | 1696 | for(i = 0; i < n; i++) { |
| 1695 | if(!(m = (Monitor *)malloc(sizeof(Monitor)))) | 1697 | if(!(m = (Monitor *)malloc(sizeof(Monitor)))) |
