From 15b12f45c69751014f7a96f089ba32a76f97d4a6 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 5 Nov 2019 10:39:36 +0100 Subject: scan-build: fix a couple of minor warnings from a scan-build run --- selection.c | 1 + 1 file changed, 1 insertion(+) (limited to 'selection.c') 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'; -- cgit v1.3