Fix core dump from (format "%#08x" n) patch
Problem reported by Glenn Morris (Bug#29609#13). * src/editfns.c (styled_format): Null-terminate output, as later code now expects this.
This commit is contained in:
parent
ff105b366c
commit
7367ea4fc7
1 changed files with 1 additions and 0 deletions
|
@ -4623,6 +4623,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
|
|||
/* Don't use sprintf here, as it might mishandle prec. */
|
||||
sprintf_buf[0] = XINT (arg);
|
||||
sprintf_bytes = prec != 0;
|
||||
sprintf_buf[sprintf_bytes] = '\0';
|
||||
}
|
||||
else if (conversion == 'd' || conversion == 'i')
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue