bugGnash - The GNU Flash player - Bugs: bug #19635, Number(<function>) returns 0...

 
 

bug #19635: Number(<function>) returns 0 not NaN

Submitted by:  None
Submitted on:  Thu 19 Apr 2007 04:51:26 PM UTC  
 
Category: ActionScriptSeverity: 3 - Normal
Release: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 15 Dec 2007 10:23:27 PM UTC, comment #2:

a quick test shows it fixed.

Sandro Santilli <strk>
Project Member
Thu 19 Apr 2007 08:19:30 PM UTC, comment #1:

Specific tests for Number(<function>) have been added to the Number.as file. See the final section (around line 358 you can find a version-dependent case).

The Date case might be special, and it will depend on
the availability of a valueOf function OR a built-in
primitive value being NaN or similar things...

We need a confirmed-to-work testcase to proceed.

Sandro Santilli <strk>
Project Member
Thu 19 Apr 2007 04:51:26 PM UTC, original submission:

var x = Math.acos; // or any other function
var n = new Number(x);

in Gnash leaves n set to 0, whereas the commercial player sets it to NaN.

This is also true of "d = new Date(x)", which implicitly converts the arg to Number before interpreting it, getting 1 Jan 1970 instead of "Invalid date" (ie d.valueOf() == NaN)

This is true for flash versions 6-9; I can't test v5.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by strk (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 15 Dec 2007 10:23:27 PM UTCstrkStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1