summaryrefslogtreecommitdiffstats
path: root/src/evalvars.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-06-10 18:43:25 +0200
committerBram Moolenaar <Bram@vim.org>2021-06-10 18:43:25 +0200
commita42e6e0082a6d564dbfa55317d4a698ac12ae898 (patch)
treef494a8a3be7ec38071904e8c1c4558cf0d53113e /src/evalvars.c
parent54656015d384a96ef814dfcf2a18e47f5ba3df14 (diff)
patch 8.2.2969: subtracting from number option fails when result is zerov8.2.2969
Problem: Subtracting from number option fails when result is zero. (Ingo Karkat) Solution: Reset the string value when using the numeric value. (closes #8351)
Diffstat (limited to 'src/evalvars.c')
-rw-r--r--src/evalvars.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/evalvars.c b/src/evalvars.c
index f3b4da222b..7581a14177 100644
--- a/src/evalvars.c
+++ b/src/evalvars.c
@@ -1439,6 +1439,7 @@ ex_let_one(
case '%': n = (long)num_modulus(numval, n,
&failed); break;
}
+ s = NULL;
}
else if (opt_type == gov_string
&& stringval != NULL && s != NULL)