php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4496 float isn't passed correctly to php function
Submitted: 2000-05-18 08:21 UTC Modified: 2001-02-10 15:48 UTC
From: Uwe dot Steinmann at fernuni-hagen dot de Assigned:
Status: Closed Package: Parser error
PHP Version: 3.0 Latest CVS (18/05/2000) OS: Linux 2.2
Private report: No CVE-ID: None
 [2000-05-18 08:21 UTC] Uwe dot Steinmann at fernuni-hagen dot de
The following line in tests/testswf

swf_defineline($LINEID,-60.0,0.0,60.0,0.0,1.2);

doesn't pass the last float corretly to the internal
php function. (True for any other float parameter as well)

I placed

fprintf(stderr, "%f %f %f %f %f\n", (float)(*x1)->value.dval,     
                                               (float)(*y1)->value.dval,
                                               (float)(*x2)->value.dval, 
                                               (float)(*y2)->value.dval, 
                                               (float)(*width)->value.dval);

in
void php_swf_define(INTERNAL_FUNCTION_PARAMETERS, int opt)

and the output is

-60,000000 0,000000 60,000000 0,000000 1,000000

Why is the last float 1.0 and not 1.2?


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-17 15:48 UTC] hholzgra@php.net
this is locale-dependant, it has been fixed in php4 but not in php3

as a workaround use setlocale("C",LC_ALL)
 [2001-02-10 15:48 UTC] jimw@php.net
duplicate of 2260.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Oct 30 22:01:28 2024 UTC