changeset 6236:d9f096200099

(doprnt): Do the right thing for negative size spec.
author Karl Heuer <kwzh@gnu.org>
date Mon, 07 Mar 1994 18:59:00 +0000
parents d93350e9d2bc
children 7c95bb9f534b
files src/doprnt.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/doprnt.c	Mon Mar 07 18:55:55 1994 +0000
+++ b/src/doprnt.c	Mon Mar 07 18:59:00 1994 +0000
@@ -94,11 +94,12 @@
 	    }
 	  *string = 0;
 	  /* Get an idea of how much space we might need.  */
-	  size_bound = atoi (&fmtcpy[1]) + 50;
+	  size_bound = atoi (&fmtcpy[1]);
 
 	  /* Avoid pitfall of negative "size" parameter ("%-200d"). */
 	  if (size_bound < 0)
 	    size_bound = -size_bound;
+	  size_bound += 50;
 
 	  /* Make sure we have that much.  */
 	  if (size_bound > size_allocated)