diff src/evalvars.c @ 24862:f1a390885192 v8.2.2969

patch 8.2.2969: subtracting from number option fails when result is zero Commit: https://github.com/vim/vim/commit/a42e6e0082a6d564dbfa55317d4a698ac12ae898 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jun 10 18:43:25 2021 +0200 patch 8.2.2969: subtracting from number option fails when result is zero Problem: Subtracting from number option fails when result is zero. (Ingo Karkat) Solution: Reset the string value when using the numeric value. (closes #8351)
author Bram Moolenaar <Bram@vim.org>
date Thu, 10 Jun 2021 18:45:03 +0200
parents a4fda40e0bb9
children 14b0b35d8488
line wrap: on
line diff
--- 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)