cvs: php4 /ext/standard pack.c
| From: | Stanislav Malyshev | Date: | Sun, 10 Sep 2000 11:03:33 +0000 |
| Subject: | cvs: php4 /ext/standard pack.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-1682@lists.php.net to get a copy of this message | ||
stas Sun Sep 10 04:03:33 2000 EDT
Modified files:
/php4/ext/standard pack.c
Log:
Fix double unpack bug
Index: php4/ext/standard/pack.c
diff -u php4/ext/standard/pack.c:1.23 php4/ext/standard/pack.c:1.24
--- php4/ext/standard/pack.c:1.23 Sun Jul 9 07:26:50 2000
+++ php4/ext/standard/pack.c Sun Sep 10 04:03:32 2000
@@ -15,7 +15,7 @@
| Authors: Chris Schneider <cschneid@relog.ch> |
+----------------------------------------------------------------------+
*/
-/* $Id: pack.c,v 1.23 2000/07/09 14:26:50 eschmid Exp $ */
+/* $Id: pack.c,v 1.24 2000/09/10 11:03:32 stas Exp $ */
#include "php.h"
@@ -460,7 +460,7 @@
* Rather than depending on error-prone ordered lists or syntactically
* unpleasant pass-by-reference, we return an object with named paramters
* (like *_fetch_object()). Syntax is "f[repeat]name/...", where "f" is the
- * formatter char (like pack()), "[repeatt]" is the optional repeater argument,
+ * formatter char (like pack()), "[repeat]" is the optional repeater argument,
* and "name" is the name of the variable to use.
* Example: "c2chars/nints" will return an object with fields
* chars1, chars2, and ints.
@@ -732,7 +732,7 @@
case 'd': {
double v;
- memcpy(&v, &input[inputpos], sizeof(float));
+ memcpy(&v, &input[inputpos], sizeof(double));
add_assoc_double(return_value, n, v);
break;
}