aboutsummaryrefslogtreecommitdiff
path: root/selection.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-11-05 09:39:36 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-11-05 09:39:36 +0000
commit15b12f45c69751014f7a96f089ba32a76f97d4a6 (patch)
tree69db86171691ebf56bc9e4010a666a9161dbec90 /selection.c
parentserver/client: harden reading of initialization data, and make async (diff)
scan-build: fix a couple of minor warnings from a scan-build run
Diffstat (limited to 'selection.c')
-rw-r--r--selection.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/selection.c b/selection.c
index e9fa55d5..2a05b853 100644
--- a/selection.c
+++ b/selection.c
@@ -108,6 +108,7 @@ extract_selection(const struct terminal *term)
start_col = 0;
}
+ assert(idx > 0);
assert(idx < buf_size);
if (buf[idx - 1] == '\n')
buf[idx - 1] = '\0';