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]));



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to