Mercurial > emacs
changeset 12797:f0724d9d625e
(doprnt): Don't let size_bound be gigantic. Fix error message.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 07 Aug 1995 17:52:16 +0000 |
parents | 20e4ad629f4d |
children | 9ac61661054b |
files | src/doprnt.c |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/doprnt.c Mon Aug 07 17:50:44 1995 +0000 +++ b/src/doprnt.c Mon Aug 07 17:52:16 1995 +0000 @@ -104,6 +104,11 @@ size_bound = -size_bound; size_bound += 50; + if (size_bound > bufsize) + /* This is certainly enough that it doesn't matter + to lose the rest. */ + size_bound = bufsize + 100; + /* Make sure we have that much. */ if (size_bound > size_allocated) { @@ -125,7 +130,7 @@ case 'o': case 'x': if (cnt == nargs) - error ("not enough arguments for format string"); + error ("Not enough arguments for format string"); if (sizeof (int) == sizeof (EMACS_INT)) ; else if (sizeof (long) == sizeof (EMACS_INT))