]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.2382: build failure v8.2.2382
authorBram Moolenaar <Bram@vim.org>
Thu, 21 Jan 2021 12:03:20 +0000 (13:03 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 21 Jan 2021 12:03:20 +0000 (13:03 +0100)
Problem:    Build failure.
Solution:   Add missing changes.

src/version.c
src/vim9execute.c

index c220a409ec7b6ac4b296019f91feaaa14a4e9aa1..2b6f6a88e3292178414cbc957f81be244f30560a 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2382,
 /**/
     2381,
 /**/
index b1bc2826364343b128dc888bf6210397180a9b8a..59a0982b3f59c4f865390fc92ed59a385c209e88 100644 (file)
@@ -2951,17 +2951,19 @@ call_def_function(
                    else
 #endif
                    {
+                       int failed = FALSE;
+
                        switch (iptr->isn_arg.op.op_type)
                        {
                            case EXPR_MULT: n1 = n1 * n2; break;
-                           case EXPR_DIV:  n1 = num_divide(n1, n2);
-                                           if (n2 == 0)
+                           case EXPR_DIV:  n1 = num_divide(n1, n2, &failed);
+                                           if (failed)
                                                goto on_error;
                                            break;
                            case EXPR_SUB:  n1 = n1 - n2; break;
                            case EXPR_ADD:  n1 = n1 + n2; break;
-                           default:        n1 = num_modulus(n1, n2);
-                                           if (n2 == 0)
+                           default:        n1 = num_modulus(n1, n2, &failed);
+                                           if (failed)
                                                goto on_error;
                                            break;
                        }