cvs: php4 /ext/standard/ formatted_print.c
[email protected] ("Jouni Ahto") Wed, 31 May 2000 22:44:29 -0000
| Newsgroups | php.version4 |
|---|---|
| Message-ID | <cvsjah959813069@cvsserver> |
jah Wed May 31 15:44:29 2000 EDT
Modified files:
/php4/ext/standard formatted_print.c
Log:
Correct fix this time... (?)
Index: php4/ext/standard/formatted_print.c
diff -u php4/ext/standard/formatted_print.c:1.18 php4/ext/standard/formatted_print.c:1.19
--- php4/ext/standard/formatted_print.c:1.18 Wed May 31 15:27:09 2000
+++ php4/ext/standard/formatted_print.c Wed May 31 15:44:29 2000
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: formatted_print.c,v 1.18 2000/05/31 22:27:09 jah Exp $ */
+/* $Id: formatted_print.c,v 1.19 2000/05/31 22:44:29 jah Exp $ */
#include <math.h> /* modf() */
#include "php.h"
@@ -159,10 +159,6 @@
npad=0;
}
- if (sign) {
- len--;
- }
-
PRINTF_DEBUG(("sprintf: appendstring(%x, %d, %d, \"%s\", %d, '%c', %d)\n",
*buffer, *pos, *size, add, min_width, padding, alignment));
if (max_width == 0) {
@@ -176,7 +172,7 @@
*buffer = erealloc(*buffer, *size);
}
if (alignment == ALIGN_RIGHT) {
- if (sign && padding=='0') { (*buffer)[(*pos)++] = '-'; add++; }
+ if (sign && padding=='0') { (*buffer)[(*pos)++] = '-'; add++; len--; }
while (npad-- > 0) {
(*buffer)[(*pos)++] = padding;
}