gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [bug #47280] Gnash's ExternalInterface does not return Nu


From: Nutchanon Wetchasit
Subject: [Gnash-commit] [bug #47280] Gnash's ExternalInterface does not return Number value correctly
Date: Tue, 01 Mar 2016 14:27:44 +0000
User-agent: Mozilla/5.0 (X11; Linux i686; rv:25.8) Gecko/20151123 Firefox/31.9 PaleMoon/25.8.1

Follow-up Comment #4, bug #47280 (project gnash):

The precision problem on Flash-calls-JavaScript return value boils down to
how
libgnashplugin marshall floating point number data
<http://git.savannah.gnu.org/cgit/gnash.git/tree/plugin/npapi/external.cpp?id=c12c3cf104a095cff9791cdb3cee8bbf4853d5e0#n361>:

    if (NPVARIANT_IS_DOUBLE(*value)) {
        double num = NPVARIANT_TO_DOUBLE(*value);
        ss << "<number>" << num << "</number>";
    } else if (NPVARIANT_IS_STRING(*value)) {


This causes precision loss as iostream used only few decimal digits when
printing `double` type to the stream. (To losslessly represent the number,
17 decimal significands were required)

Gnash: 0.8.11dev (git c12c3cf 22-Feb-2016)
System: Debian GNU/Linux 7.0 Wheezy i386

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?47280>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]