cvs: php4(PHP_4_3) /ext/standard scanf.c
| From: | Moriyoshi Koizumi | Date: | Sat, 18 Jan 2003 21:20:48 +0000 |
| Subject: | cvs: php4(PHP_4_3) /ext/standard scanf.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-18026@lists.php.net to get a copy of this message | ||
moriyoshi Sat Jan 18 16:20:48 2003 EDT
Modified files: (Branch: PHP_4_3)
/php4/ext/standard scanf.c
Log:
MFH: fixed bug #21726 and #21730
Index: php4/ext/standard/scanf.c
diff -u php4/ext/standard/scanf.c:1.16.4.3 php4/ext/standard/scanf.c:1.16.4.4
--- php4/ext/standard/scanf.c:1.16.4.3 Tue Dec 31 11:35:34 2002
+++ php4/ext/standard/scanf.c Sat Jan 18 16:20:47 2003
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: scanf.c,v 1.16.4.3 2002/12/31 16:35:34 sebastian Exp $ */
+/* $Id: scanf.c,v 1.16.4.4 2003/01/18 21:20:47 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);
}