aboutsummaryrefslogtreecommitdiffstats
path: root/anchor.c
diff options
context:
space:
mode:
Diffstat (limited to 'anchor.c')
-rw-r--r--anchor.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/anchor.c b/anchor.c
index 2d21bfa..fa8d3eb 100644
--- a/anchor.c
+++ b/anchor.c
@@ -685,6 +685,8 @@ addMultirowsForm(Buffer *buf, AnchorList *al)
a->hseq = a_form.hseq;
a->y = a_form.y;
a->end.pos = pos + ecol - col;
+ if (pos < 1 || a->end.pos >= l->size)
+ continue;
l->lineBuf[pos - 1] = '[';
l->lineBuf[a->end.pos] = ']';
for (k = pos; k < a->end.pos; k++)