aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/doprnt.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/doprnt.c b/src/doprnt.c
index 1743c785f01..39562af19fa 100644
--- a/src/doprnt.c
+++ b/src/doprnt.c
@@ -126,6 +126,16 @@ doprnt (buffer, bufsize, format, format_end, nargs, args)
126 case 'x': 126 case 'x':
127 if (cnt == nargs) 127 if (cnt == nargs)
128 error ("not enough arguments for format string"); 128 error ("not enough arguments for format string");
129 if (sizeof (int) == sizeof (EMACS_INT))
130 ;
131 else if (sizeof (long) == sizeof (EMACS_INT))
132 /* Insert an `l' the right place. */
133 string[1] = string[0],
134 string[0] = string[-1],
135 string[-1] = 'l',
136 string++;
137 else
138 abort ();
129 sprintf (sprintf_buffer, fmtcpy, args[cnt++]); 139 sprintf (sprintf_buffer, fmtcpy, args[cnt++]);
130 /* Now copy into final output, truncating as nec. */ 140 /* Now copy into final output, truncating as nec. */
131 string = sprintf_buffer; 141 string = sprintf_buffer;