dmitry          Fri Aug 12 09:41:19 2005 EDT

  Modified files:              
    /php-src/ext/standard       string.c 
  Log:
  Fixed str_repeat() bug
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/string.c?r1=1.449&r2=1.450&ty=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.449 php-src/ext/standard/string.c:1.450
--- php-src/ext/standard/string.c:1.449 Fri Aug 12 06:10:41 2005
+++ php-src/ext/standard/string.c       Fri Aug 12 09:41:15 2005
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: string.c,v 1.449 2005/08/12 10:10:41 sebastian Exp $ */
+/* $Id: string.c,v 1.450 2005/08/12 13:41:15 dmitry Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -4740,13 +4740,13 @@
        
        if ( input_str_type == IS_UNICODE ) {
                *(((UChar *)result)+result_chars-1) = 0;
-               RETURN_UNICODEL((UChar *)result, result_chars, 0);
+               RETURN_UNICODEL((UChar *)result, result_chars-1, 0);
        } else {
                *(((char *)result)+result_chars-1) = '\0';
                if ( input_str_type == IS_BINARY ) {
-                       RETURN_BINARYL((char *)result, result_chars, 0);
+                       RETURN_BINARYL((char *)result, result_chars-1, 0);
                } else {
-                       RETURN_STRINGL((char *)result, result_chars, 0);
+                       RETURN_STRINGL((char *)result, result_chars-1, 0);
                }
        }
 }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to