aboutsummaryrefslogtreecommitdiff
path: root/selection.c
diff options
context:
space:
mode:
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';