# HG changeset patch # User Richard M. Stallman # Date 807817936 0 # Node ID f0724d9d625e97469d591c86b4f9f9728ddf17e9 # Parent 20e4ad629f4d3262cd0e3787053d5fd82f23d483 (doprnt): Don't let size_bound be gigantic. Fix error message. diff -r 20e4ad629f4d -r f0724d9d625e src/doprnt.c --- 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))