summaryrefslogtreecommitdiff
path: root/dwm.c
diff options
context:
space:
mode:
authorstderr64 <stderr64@null.net>2026-09-09 20:09:24 +0300
committerstderr64 <stderr64@null.net>2026-09-09 20:09:24 +0300
commit1e36be78dfd59325cc2d4d633a16121291d5774d (patch)
treea8ec050a12c90926736eb3d8d638d08db45b8d3f /dwm.c
parent30ea8fae68683c5541269da257eef1e6eff27fe6 (diff)
downloaddwm_custom-1e36be78dfd59325cc2d4d633a16121291d5774d.tar.gz
dwm_custom-1e36be78dfd59325cc2d4d633a16121291d5774d.tar.zst
Changed color scheme to gruvbox style colors and fixed strncpy not ensuring terminating NULL byte in ltsymbol in Monitor structHEADmaster
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/dwm.c b/dwm.c
index 72a826f..fa44763 100644
--- a/dwm.c
+++ b/dwm.c
@@ -113,7 +113,7 @@ typedef struct {
} Layout;
struct Monitor {
- char ltsymbol[16];
+ char ltsymbol[17];
float mfact;
int nmaster;
int num;
@@ -410,7 +410,7 @@ arrange(Monitor *m)
void
arrangemon(Monitor *m)
{
- strncpy(m->ltsymbol, m->lt[m->sellt]->symbol, sizeof m->ltsymbol);
+ strncpy(m->ltsymbol, m->lt[m->sellt]->symbol, sizeof(m->ltsymbol) - 1);
if (m->lt[m->sellt]->arrange)
m->lt[m->sellt]->arrange(m);
}
@@ -1636,7 +1636,7 @@ setlayout(const Arg *arg)
selmon->sellt ^= 1;
if (arg && arg->v)
selmon->lt[selmon->sellt] = (Layout *)arg->v;
- strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, sizeof selmon->ltsymbol);
+ strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, sizeof(selmon->ltsymbol) - 1);
if (selmon->sel)
arrange(selmon);
else