aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-02-15 18:30:59 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-02-15 18:30:59 +0000
commit291410bd71aeceacb880c2a265baa6a9f3e0948f (patch)
tree01e43d4939063e23b96ab1e233b08810f02a099d
parentMerge branch 'font-dpi-adjust-on-the-fly' (diff)
wayland: debug: make sure state_str is properly NULL terminated
-rw-r--r--wayland.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/wayland.c b/wayland.c
index 8528f987..830f114d 100644
--- a/wayland.c
+++ b/wayland.c
@@ -473,6 +473,8 @@ xdg_toplevel_configure(void *data, struct xdg_toplevel *xdg_toplevel,
#if defined(LOG_ENABLE_DBG) && LOG_ENABLE_DBG
if (state_chars > 2)
state_str[state_chars - 2] = '\0';
+ else
+ state_str[0] = '\0';
LOG_DBG("xdg-toplevel: configure: size=%dx%d, states=%s",
width, height, state_str);