From: Denis Vlasenko Date: Fri, 27 Jun 2008 04:06:13 +0000 (-0000) Subject: vi: fix vda's thinko X-Git-Tag: 1_12_0~287 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d699544205de1ba8d36d98e4842e9a067e4c32ab;p=oweals%2Fbusybox.git vi: fix vda's thinko --- diff --git a/editors/vi.c b/editors/vi.c index 1b335d9a1..81baa890f 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;