diff options
author | Ron Yorston <rmy@pobox.com> | 2015-10-13 14:45:51 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2015-10-13 14:45:51 +0100 |
commit | 8e509f11bceeec419abc718300bef7422d1fee4c (patch) | |
tree | fdfbc752ad94102e3613a5d7254f14a93eaf7f56 /editors/vi.c | |
parent | 420f5edfe7676fe6e7cddbbf15c04649d096e422 (diff) | |
parent | 4d0c1ea4784c9844f8468d97ca5c26d3c70f9921 (diff) | |
download | busybox-w32-8e509f11bceeec419abc718300bef7422d1fee4c.tar.gz busybox-w32-8e509f11bceeec419abc718300bef7422d1fee4c.tar.bz2 busybox-w32-8e509f11bceeec419abc718300bef7422d1fee4c.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'editors/vi.c')
-rw-r--r-- | editors/vi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/editors/vi.c b/editors/vi.c index 075f714cf..b2d185193 100644 --- a/editors/vi.c +++ b/editors/vi.c | |||
@@ -2919,10 +2919,10 @@ static int file_insert(const char *fn, char *p, int initial) | |||
2919 | int fd, size; | 2919 | int fd, size; |
2920 | struct stat statbuf; | 2920 | struct stat statbuf; |
2921 | 2921 | ||
2922 | if (p < text || p > end) { | 2922 | if (p < text) |
2923 | status_line_bold("Trying to insert file outside of memory"); | 2923 | p = text; |
2924 | return cnt; | 2924 | if (p > end) |
2925 | } | 2925 | p = end; |
2926 | 2926 | ||
2927 | fd = open(fn, O_RDONLY); | 2927 | fd = open(fn, O_RDONLY); |
2928 | if (fd < 0) { | 2928 | if (fd < 0) { |