vim-patch:8.2.3613: :find test fails

Problem:    :find test fails.
Solution:   Put length check inside if block.
e015d99abb
This commit is contained in:
zeertzjq 2022-01-18 10:05:31 +08:00
parent ec39e1e421
commit dda1c8edda

View File

@ -1433,11 +1433,11 @@ char_u *find_file_in_path_option(char_u *ptr, size_t len, int options, int first
rel_fname = NULL;
}
if (len == 0) {
return NULL;
}
if (first == true) {
if (len == 0) {
return NULL;
}
if (first == TRUE) {
// copy file name into NameBuff, expanding environment variables
save_char = ptr[len];
ptr[len] = NUL;