summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko2008-06-27 04:06:13 +0000
committerDenis Vlasenko2008-06-27 04:06:13 +0000
commitd699544205de1ba8d36d98e4842e9a067e4c32ab (patch)
tree3e8c4cc26bf4325e07e5a175da49d74782271b15
parent42b8daf88a600289d6b72c52777183ef64b05bb0 (diff)
downloadbusybox-d699544205de1ba8d36d98e4842e9a067e4c32ab.zip
busybox-d699544205de1ba8d36d98e4842e9a067e4c32ab.tar.gz
vi: fix vda's thinko
-rw-r--r--editors/vi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/editors/vi.c b/editors/vi.c
index 1b335d9..81baa89 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -1894,7 +1894,7 @@ static char *text_hole_make(char *p, int size) // at "p", make a 'size' byte hol
p = new_text + (p - text);
text = new_text;
}
- memmove(p + size, p, end - p);
+ memmove(p + size, p, end - size - p);
memset(p, ' ', size); // clear new hole
file_modified++;
return p;