From fb8dfba0f14c5db43fa161103b28764ff198db8f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 20 Sep 2023 01:04:32 -0700 Subject: [PATCH] Fix off-by-1 typo in vadd_to_log * src/xdisp.c (vadd_to_log): Fix off-by-1 typo that I introduced in commit fbee6265a72a4129d2efbf15a622b13e8b4aae9f dated Thu Aug 13 13:48:28 2015 -0700. Problem and fix reported by Robert Pluim (Bug#66098#11). --- src/xdisp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xdisp.c b/src/xdisp.c index 2944f3964e8..f1980c4f20c 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -11808,7 +11808,7 @@ vadd_to_log (char const *format, va_list ap) eassert (nargs <= ARRAYELTS (args)); AUTO_STRING (args0, format); args[0] = args0; - for (ptrdiff_t i = 1; i <= nargs; i++) + for (ptrdiff_t i = 1; i < nargs; i++) args[i] = va_arg (ap, Lisp_Object); Lisp_Object msg = Qnil; msg = Fformat_message (nargs, args); -- 2.39.2