moriyoshi               Sat Jan 18 13:31:14 2003 EDT

  Modified files:              
    /php4/ext/standard  scanf.c 
  Log:
  Fixed bug #21726 and #21730
  
  
Index: php4/ext/standard/scanf.c
diff -u php4/ext/standard/scanf.c:1.19 php4/ext/standard/scanf.c:1.20
--- php4/ext/standard/scanf.c:1.19      Tue Dec 31 11:07:54 2002
+++ php4/ext/standard/scanf.c   Sat Jan 18 13:31:13 2003
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: scanf.c,v 1.19 2002/12/31 16:07:54 sebastian Exp $ */
+/* $Id: scanf.c,v 1.20 2003/01/18 18:31:13 moriyoshi Exp $ */
 
 /*
    scanf.c --
@@ -762,9 +762,9 @@
             case 'n':
                 if (!(flags & SCAN_SUPPRESS)) {
                     if (numVars) {
-                        current = args[objIndex++];
-                        convert_to_long( *current );
-                        ZVAL_STRINGL( *current, string, end-string, 1);
+                                               current = args[objIndex++];
+                        zval_dtor( *current );
+                        ZVAL_LONG( *current, (long)(string - baseString) );
                     } else {
                         add_index_long(*return_value, objIndex++, string - 
baseString);
                     }
@@ -883,8 +883,8 @@
             if (!(flags & SCAN_SUPPRESS)) {
                 if (numVars) {
                     current = args[objIndex++];
-                    convert_to_string( *current );
-                    ZVAL_STRINGL( *current, string, end-string, 1);
+                                       zval_dtor( *current );
+                                       ZVAL_STRINGL( *current, string, end-string, 1);
                 } else {
                     add_index_stringl( *return_value, objIndex++, string, end-string, 
1);
                 }



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

Reply via email to