diff src/eval.c @ 30433:36f1b763ae16 v9.0.0552

patch 9.0.0552: crash when using NUL in buffer that uses :source Commit: https://github.com/vim/vim/commit/69082916c8b5d321545d60b9f5facad0a2dd5a4e Author: Bram Moolenaar <Bram@vim.org> Date: Thu Sep 22 21:35:19 2022 +0100 patch 9.0.0552: crash when using NUL in buffer that uses :source Problem: Crash when using NUL in buffer that uses :source. Solution: Don't get a next line when skipping over NL.
author Bram Moolenaar <Bram@vim.org>
date Thu, 22 Sep 2022 22:45:04 +0200
parents fc0830246f49
children d77a900f6094
line wrap: on
line diff
--- a/src/eval.c
+++ b/src/eval.c
@@ -253,7 +253,7 @@ eval_expr_typval(typval_T *expr, typval_
 	    if (fc == NULL)
 		return FAIL;
 
-	    // Shortcut to call a compiled function without overhead.
+	    // Shortcut to call a compiled function with minimal overhead.
 	    r = call_def_function(partial->pt_func, argc, argv,
 					  DEF_USE_PT_ARGV, partial, fc, rettv);
 	    remove_funccal();
@@ -2291,7 +2291,7 @@ eval_next_non_blank(char_u *arg, evalarg
 
 	if (next != NULL)
 	{
-	    *getnext = TRUE;
+	    *getnext = *p != NL;
 	    return skipwhite(next);
 	}
     }