Commit 4b488a29 authored by Paul Eggert's avatar Paul Eggert
Browse files

Fix generate-new-buffer-name increment typo

Problem reported by Chaitanya Koparkar (Bug#23394).
* src/buffer.c (Fgenerate_new_buffer_name): Increment count when
generating a new buffer.  This fixes a typo I introduced in
parent 25e95b5d
......@@ -1077,7 +1077,7 @@ is first appended to NAME, to speed up finding a non-existent buffer. */)
char number[INT_BUFSIZE_BOUND (ptrdiff_t) + sizeof "<>"];
AUTO_STRING_WITH_LEN (lnumber, number,
sprintf (number, "<%"pD"d>", count));
sprintf (number, "<%"pD"d>", ++count));
Lisp_Object gentemp = concat2 (genbase, lnumber);
if (!NILP (Fstring_equal (gentemp, ignore))
|| NILP (Fget_buffer (gentemp)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment