Mercurial > emacs
diff src/doprnt.c @ 12830:cc26e7c955cc
(doprnt): Error if %-width is too big.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 11 Aug 1995 00:42:28 +0000 |
parents | f0724d9d625e |
children | f83031b644ac |
line wrap: on
line diff
--- a/src/doprnt.c Fri Aug 11 00:41:00 1995 +0000 +++ b/src/doprnt.c Fri Aug 11 00:42:28 1995 +0000 @@ -104,10 +104,8 @@ 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; + if (size_bound > (unsigned) (1 << (INTBITS - 1))) + error ("Format padding to large"); /* Make sure we have that much. */ if (size_bound > size_allocated)