Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:25820 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19339 invoked by uid 1010); 25 Sep 2006 14:26:56 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 19324 invoked from network); 25 Sep 2006 14:26:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Sep 2006 14:26:56 -0000 Authentication-Results: pb1.pair.com header.from=php_lists@realplain.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php_lists@realplain.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain realplain.com from 69.179.208.43 cause and error) X-PHP-List-Original-Sender: php_lists@realplain.com X-Host-Fingerprint: 69.179.208.43 msa3-mx.centurytel.net Linux 2.4/2.6 Received: from [69.179.208.43] ([69.179.208.43:36213] helo=msa3-mx.centurytel.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F2/63-24622-E27E7154 for ; Mon, 25 Sep 2006 10:26:55 -0400 Received: from pc1 (d34-22.rt-bras.wnvl.centurytel.net [69.179.161.22]) by msa3-mx.centurytel.net (8.13.6/8.13.6) with SMTP id k8PEQpA3024531 for ; Mon, 25 Sep 2006 09:26:51 -0500 Message-ID: <016201c6e0ae$a5011240$0201a8c0@pc1> To: Date: Mon, 25 Sep 2006 09:26:52 -0500 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_015F_01C6E084.BC0273A0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1807 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Subject: [PATCH] Small typo in zend_u_strtol From: php_lists@realplain.com ("Matt W") ------=_NextPart_000_015F_01C6E084.BC0273A0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hi, Noticed this a couple months ago and never sent this simple thing. :-) ERANGE is being triggered too soon because of the wrong variable, which causes the following (in Unicode mode, of course) on 32-bit: (int) '2147483640' // int(2147483647) '2147483640' + 0) // float(2147483640) Instead of the expected int(2147483640) in both cases. Matt ------=_NextPart_000_015F_01C6E084.BC0273A0 Content-Type: text/plain; name="zend_u_strtol.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="zend_u_strtol.txt" Index: zend_strtol.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /repository/ZendEngine2/zend_strtol.c,v=0A= retrieving revision 1.2=0A= diff -u -r1.2 zend_strtol.c=0A= --- zend_strtol.c 21 Feb 2006 20:12:41 -0000 1.2=0A= +++ zend_strtol.c 21 Sep 2006 08:49:24 -0000=0A= @@ -103,7 +103,7 @@=0A= for (acc =3D 0, any =3D 0;; c =3D *s++) {=0A= if ((val =3D u_digit(c, base)) < 0)=0A= break;=0A= - if (any < 0 || acc > cutoff || (acc =3D=3D cutoff && c > cutlim))=0A= + if (any < 0 || acc > cutoff || (acc =3D=3D cutoff && val > cutlim))=0A= any =3D -1;=0A= else {=0A= any =3D 1;=0A= ------=_NextPart_000_015F_01C6E084.BC0273A0--