cvs: php4 /ext/standard formatted_print.c

From: Date: Wed, 25 Apr 2001 21:05:59 +0000
Subject: cvs: php4 /ext/standard formatted_print.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-5267@lists.php.net to get a copy of this message
rasmus Wed Apr 25 14:05:59 2001 EDT Modified files: /php4/ext/standard formatted_print.c Log: - Make the printf functions binary clean @ - Make the printf family of functions binary clean Index: php4/ext/standard/formatted_print.c diff -u php4/ext/standard/formatted_print.c:1.30 php4/ext/standard/formatted_print.c:1.31 --- php4/ext/standard/formatted_print.c:1.30 Mon Apr 9 08:44:24 2001 +++ php4/ext/standard/formatted_print.c Wed Apr 25 14:05:59 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: formatted_print.c,v 1.30 2001/04/09 15:44:24 rasmus Exp $ */ +/* $Id: formatted_print.c,v 1.31 2001/04/25 21:05:59 rasmus Exp $ */ #include <math.h> /* modf() */ #include "php.h" @@ -184,7 +184,7 @@ } } PRINTF_DEBUG(("sprintf: appending \"%s\"\n", add)); - strncpy(&(*buffer)[*pos], add, MIN(max_width, len)+1); + memcpy(&(*buffer)[*pos], add, MIN(max_width, len)+1); *pos += MIN(max_width, len); if (alignment == ALIGN_LEFT) { while (npad--) { @@ -411,7 +411,7 @@ currarg = 1; - while (format[inpos]) { + while (inpos<(*args[0])->value.str.len) { int expprec = 0; PRINTF_DEBUG(("sprintf: format[%d]='%c'\n", inpos, format[inpos]));

« previous php.cvs (#5267) next »