diff src/eval.c @ 15482:18dd04f7c4a1 v8.1.0749

patch 8.1.0749: error message contains garbage commit https://github.com/vim/vim/commit/6acc79f5d4b9d5b02f4ab21ec885e68acc13a2e2 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jan 14 22:53:31 2019 +0100 patch 8.1.0749: error message contains garbage Problem: Error message contains garbage. (Dominique Pelle) Solution: Use correct pointer to failed expression.
author Bram Moolenaar <Bram@vim.org>
date Mon, 14 Jan 2019 23:00:06 +0100
parents 051937ebaf22
children 98c35d312987
line wrap: on
line diff
--- a/src/eval.c
+++ b/src/eval.c
@@ -702,6 +702,7 @@ eval_to_bool(
     static int
 eval1_emsg(char_u **arg, typval_T *rettv, int evaluate)
 {
+    char_u	*start = *arg;
     int		ret;
     int		did_emsg_before = did_emsg;
     int		called_emsg_before = called_emsg;
@@ -715,7 +716,7 @@ eval1_emsg(char_u **arg, typval_T *rettv
 	// Also check called_emsg for when using assert_fails().
 	if (!aborting() && did_emsg == did_emsg_before
 					  && called_emsg == called_emsg_before)
-	    semsg(_(e_invexpr2), arg);
+	    semsg(_(e_invexpr2), start);
     }
     return ret;
 }