cvs: php4 /ext/standard/ formatted_print.c

From: Date: Wed, 31 May 2000 22:27:09 +0000
Subject: cvs: php4 /ext/standard/ formatted_print.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-16000@lists.php.net to get a copy of this message
jah Wed May 31 15:27:09 2000 EDT Modified files: /php4/ext/standard formatted_print.c Log: Fix a nasty off-by-one with negative numbers. # Hey, this has been there for years undetected. Index: php4/ext/standard/formatted_print.c diff -u php4/ext/standard/formatted_print.c:1.17 php4/ext/standard/formatted_print.c:1.18 --- php4/ext/standard/formatted_print.c:1.17 Thu May 18 08:34:35 2000 +++ php4/ext/standard/formatted_print.c Wed May 31 15:27:09 2000 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: formatted_print.c,v 1.17 2000/05/18 15:34:35 zeev Exp $ */ +/* $Id: formatted_print.c,v 1.18 2000/05/31 22:27:09 jah Exp $ */ #include <math.h> /* modf() */ #include "php.h" @@ -157,6 +157,10 @@ if (npad<0) { npad=0; + } + + if (sign) { + len--; } PRINTF_DEBUG(("sprintf: appendstring(%x, %d, %d, \"%s\", %d, '%c', %d)\n",

« previous php.version4 (#16000) next »