]> granicus.if.org Git - vim/commitdiff
patch 8.0.1229: condition in vim_str2nr() is always true v8.0.1229
authorBram Moolenaar <Bram@vim.org>
Sat, 28 Oct 2017 13:38:40 +0000 (15:38 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 28 Oct 2017 13:38:40 +0000 (15:38 +0200)
Problem:    Condition in vim_str2nr() is always true. (Nikolai Pavlov)
Solution:   Remove the condition. (Closes #2259)

src/charset.c
src/version.c

index 4516816fe4bac7ae903f486ebcdd8fa8bada9c70..a8b704c6985fb46d3d94f087905eb964b2544f76 100644 (file)
@@ -1907,8 +1907,7 @@ vim_str2nr(
                        pre = 0;        /* can't be octal */
                        break;
                    }
-                   if (ptr[n] >= '0')
-                       pre = '0';      /* assume octal */
+                   pre = '0';  /* assume octal */
                    if (n == maxlen)
                        break;
                }
index b49c7643cf51a742034fd369f1817989ea616236..1da082d1f643a093f41edc68f47a91124a1d16e6 100644 (file)
@@ -761,6 +761,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1229,
 /**/
     1228,
 /**/