aboutsummaryrefslogtreecommitdiffstats
path: root/form.c
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2016-12-10 16:04:44 +0000
committerTatsuya Kinoshita <tats@debian.org>2016-12-13 12:44:40 +0000
commita4152aaaea5cb51c9018880a1295e498c38889bf (patch)
tree459ac660e059d8785bc63c893235c734a3ab57be /form.c
parentUpdate ChangeLog (diff)
downloadw3m-a4152aaaea5cb51c9018880a1295e498c38889bf.tar.gz
w3m-a4152aaaea5cb51c9018880a1295e498c38889bf.zip
Preserve one byte for end of string character in form_update_line()
Bug-Debian: https://github.com/tats/w3m/issues/82 cf. https://github.com/tats/w3m/issues/68#issuecomment-266214643
Diffstat (limited to '')
-rw-r--r--form.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/form.c b/form.c
index 0dfbaa8..fdad786 100644
--- a/form.c
+++ b/form.c
@@ -319,7 +319,7 @@ form_update_line(Line *line, char **str, int spos, int epos, int width,
}
pos += width - w;
- len = line->len + pos + spos - epos;
+ len = line->len + pos + spos - epos + 1;
buf = New_N(char, len);
prop = New_N(Lineprop, len);
bcopy((void *)line->lineBuf, (void *)buf, spos * sizeof(char));