aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/memline.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/memline.c')
-rw-r--r--src/nvim/memline.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/memline.c b/src/nvim/memline.c
index 5acf4f0c37..a21c232a2d 100644
--- a/src/nvim/memline.c
+++ b/src/nvim/memline.c
@@ -864,7 +864,7 @@ void ml_recover(bool checkext)
goto theend;
}
ZeroBlock *b0p = hp->bh_data;
- if (strncmp(b0p->b0_version, "VIM 3.0", 7) == 0) {
+ if (strncmp(b0p->b0_version, S_LEN("VIM 3.0")) == 0) {
msg_start();
msg_outtrans(mfp->mf_fname, MSG_HIST);
msg_puts_attr(_(" cannot be used with this version of Vim.\n"),
@@ -1538,7 +1538,7 @@ static time_t swapfile_info(char *fname)
int fd = os_open(fname, O_RDONLY, 0);
if (fd >= 0) {
if (read_eintr(fd, &b0, sizeof(b0)) == sizeof(b0)) {
- if (strncmp(b0.b0_version, "VIM 3.0", 7) == 0) {
+ if (strncmp(b0.b0_version, S_LEN("VIM 3.0")) == 0) {
msg_puts(_(" [from Vim version 3.0]"));
} else if (ml_check_b0_id(&b0) == FAIL) {
msg_puts(_(" [does not look like a Vim swap file]"));