0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-11-23 16:06:16 +00:00
termux-packages/x11-packages/emacs-x/no-procent_n-android.patch
2023-09-17 09:47:39 +02:00

24 lines
888 B
Diff

--- ./src/emacs.c.org 2023-09-04 19:14:48.656907177 +0200
+++ ./src/emacs.c 2023-09-04 19:16:06.510742013 +0200
@@ -2958,17 +2958,17 @@
reset_all_sys_modes ();
if (sig && sig != SIGTERM)
{
- static char const fmt[] = "Fatal error %d: %n%s\n";
+ static char const fmt[] = "Fatal error %d: %s\n";
#ifdef HAVE_HAIKU
if (haiku_debug_on_fatal_error)
debugger ("Fatal error in Emacs");
#endif
- char buf[max ((sizeof fmt - sizeof "%d%n%s\n"
+ char buf[max ((sizeof fmt - sizeof "%d%s\n"
+ INT_STRLEN_BOUND (int) + 1),
min (PIPE_BUF, MAX_ALLOCA))];
char const *sig_desc = safe_strsignal (sig);
int nlen;
- int buflen = snprintf (buf, sizeof buf, fmt, sig, &nlen, sig_desc);
+ int buflen = snprintf (buf, sizeof buf, fmt, sig, sig_desc);
if (0 <= buflen && buflen < sizeof buf)
emacs_write (STDERR_FILENO, buf, buflen);
else