Review Request: kjs: Fix parseFloat not cutting-off leading unicode spaces

Maks Orlovich maksim at kde.org
Sun May 13 14:51:16 BST 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104858/#review13776
-----------------------------------------------------------


I think this is the wrong place to fix this, actually; I think you want to change it in ustring.cpp so it affects
the implicit conversions as well. Testcase:

"\u180e6"*7 

(See also 9.3.1)


- Maks Orlovich


On May 4, 2012, 5:40 p.m., Bernd Buschinski wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/104858/
> -----------------------------------------------------------
> 
> (Updated May 4, 2012, 5:40 p.m.)
> 
> 
> Review request for kdelibs.
> 
> 
> Description
> -------
> 
> kjs: Fix parseFloat not cutting-off leading unicode spaces
> 
> parseInt cuts away the leading spaces, like it should, but we don't to it for parseFloat, like we should.
> UString::toDouble does remove leading spaces, but only ascii spaces, no unicodespaces.
> 
> ECMA 15.1.2.3 Step 2 confirms that leading spaces should be cut
> 
> depends on https://git.reviewboard.kde.org/r/104855/
> 
> 
> Diffs
> -----
> 
>   kjs/function.cpp 5f39ae6 
> 
> Diff: http://git.reviewboard.kde.org/r/104858/diff/
> 
> 
> Testing
> -------
> 
> Fixes a couple of ecma parseFloat tests
> 
> 
> Thanks,
> 
> Bernd Buschinski
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20120513/c4feaba3/attachment.htm>


More information about the kde-core-devel mailing list