> --- 12638,12664 ----
>       if (n == FALSE)
>       {
>       if (STRNICMP(name, "patch", 5) == 0)
> !     {
> !         if (name[5] == '-'
> !                 && STRLEN(name) > 11
> !                 && vim_isdigit(name[6])
> !                 && vim_isdigit(name[8])
> !                 && vim_isdigit(name[10]))
> !         {
> !             int major = atoi((char *)name + 6);
> !             int minor = atoi((char *)name + 8);
> !             int patch = atoi((char *)name + 10);
> ! 
> !             /* Expect "patch-9.9.01234". */
> !             n = (major < VIM_VERSION_MAJOR
> !                  || (major == VIM_VERSION_MAJOR
> !                      && (minor < VIM_VERSION_MINOR
> !                          || (minor == VIM_VERSION_MINOR
> !                              && patch <= highest_patch()))));

If I am not mistaking, this (using highest_patch()) means not that patch was 
actually included, but that last included patch number is greater then or equal 
to requested one. This is a useless check: checking against the patch number 
usually means missing ability to use has()/exists() to check for feature 
existence, so on some distributions (e.g. CentOS) that like to include only a 
subset of patches (i.e. only patches that fix bugs) using 
(has('patch-7.4.100')) will falsely report 1 while actually patch 100 is 
missing (though 101 was included), but `has('patch100')` will report that it is 
missing.

I think here `has_patch()` should be used, not highest_patch().

> !         }
> !         else
> !             n = has_patch(atoi((char *)name + 5));
> !     }

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui