Re: cvs: php-src /ext/standard pack.c /ext/standard/tests/strings bug38770.phpt
| From: | Hannes Magnusson | Date: | Tue, 26 May 2009 08:02:53 +0000 |
| Subject: | Re: cvs: php-src /ext/standard pack.c /ext/standard/tests/strings bug38770.phpt | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-58209@lists.php.net to get a copy of this message | ||
This is still broken Ilia
-Hannes
On Tue, May 12, 2009 at 14:37, Ilia Alshanetsky <iliaa@php.net> wrote:
> iliaa Tue May 12 12:37:52 2009 UTC
>
> Modified files:
> /php-src/ext/standard/tests/strings bug38770.phpt
> /php-src/ext/standard pack.c
> Log:
>
> MFB: Fixed bug #47564 (unpacking unsigned long 32bit bit endian returns
> wrong result)
>
>
>
> http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/bug38770..phpt?r1=1.3&r2=1.4&diff_format=u
> Index: php-src/ext/standard/tests/strings/bug38770.phpt
> diff -u php-src/ext/standard/tests/strings/bug38770.phpt:1.3
> php-src/ext/standard/tests/strings/bug38770.phpt:1.4
> --- php-src/ext/standard/tests/strings/bug38770.phpt:1.3 Tue May 27 10:50:45 2008
> +++ php-src/ext/standard/tests/strings/bug38770.phpt Tue May 12 12:37:52 2009
> @@ -12,7 +12,7 @@
> --EXPECT--
> Array
> (
> - [1] => -30000
> + [1] => 4294937296
> )
> Array
> (
>
> http://cvs.php.net/viewvc.cgi/php-src/ext/standard/pack.c?r1=1.73&r2=1.74&diff_format=u
> Index: php-src/ext/standard/pack.c
> diff -u php-src/ext/standard/pack.c:1.73 php-src/ext/standard/pack.c:1.74
> --- php-src/ext/standard/pack.c:1.73 Tue Mar 10 23:39:40 2009
> +++ php-src/ext/standard/pack.c Tue May 12 12:37:52 2009
> @@ -15,7 +15,7 @@
> | Author: Chris Schneider <cschneid@relog.ch>
> |
> +----------------------------------------------------------------------+
> */
> -/* $Id: pack.c,v 1.73 2009/03/10 23:39:40 helly Exp $ */
> +/* $Id: pack.c,v 1.74 2009/05/12 12:37:52 iliaa Exp $ */
>
> #include "php.h"
>
> @@ -777,6 +777,13 @@
> }
>
> v |=
> php_unpack(&input[inputpos], 4, issigned, map);
> + if (sizeof(long) > 4)
> {
> + if (type ==
> 'l') {
> +
> v = (signed int) v;
> + } else {
> +
> v = (unsigned int) v;
> + }
> + }
>
> add_rt_assoc_long(return_value, n, v);
> break;
> }
>
>
>
> --
> PHP CVS Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>