diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-06-30 11:03:39 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-06-30 11:03:39 +0100 |
commit | b0375d466e5ca57dca71995c342870b3226d8115 (patch) | |
tree | 5052fe53ff378adf24d365e3693e15680635a468 /src/version.c | |
parent | 083692d598139228e101b8c521aaef7bcf256e9a (diff) | |
download | vim-git-b0375d466e5ca57dca71995c342870b3226d8115.tar.gz |
patch 9.0.0010: returning 0 for has('patch-9.0.0') is inconsistentv9.0.0010
Problem: Returning 0 for has('patch-9.0.0') is inconsistent.
Solution: Make it return 1. (closes #10640)
Diffstat (limited to 'src/version.c')
-rw-r--r-- | src/version.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/version.c b/src/version.c index 003984ab6..c2726aa77 100644 --- a/src/version.c +++ b/src/version.c @@ -736,6 +736,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 10, +/**/ 9, /**/ 8, @@ -789,11 +791,13 @@ has_patch(int n) // Perform a binary search. l = 0; h = (int)ARRAY_LENGTH(included_patches) - 1; - while (l < h) + for (;;) { m = (l + h) / 2; if (included_patches[m] == n) return TRUE; + if (l == h) + break; if (included_patches[m] < n) h = m; else |