[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnash-commit
Subject:    [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-2265-g982270f
From:       Sandro Santilli <strk () keybit ! net>
Date:       2016-02-22 9:09:47
Message-ID: E1aXmV0-00081E-N9 () vcs ! savannah ! gnu ! org
[Download RAW message or body]

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  982270fff22b80f7d3872f3696f4636053894ca4 (commit)
      from  051aa9c34b69e1a0a1d2d75e3cf1db07fcea4006 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=982270fff22b80f7d3872f3696f4636053894ca4


commit 982270fff22b80f7d3872f3696f4636053894ca4
Author: Nutchanon Wetchasit <Nutchanon.Wetchasit@gmail.com>
Date:   Mon Feb 22 10:04:15 2016 +0100

    Treat infinite and NaN line thickness in MovieClip.lineStyle() as zero.
    
    See bug #45731 <https://savannah.gnu.org/bugs/?45731>

diff --git a/libcore/asobj/MovieClip_as.cpp b/libcore/asobj/MovieClip_as.cpp
index 5b3eb3e..02b8cce 100644
--- a/libcore/asobj/MovieClip_as.cpp
+++ b/libcore/asobj/MovieClip_as.cpp
@@ -1,6 +1,7 @@
 // MovieClip_as.cpp:  ActionScript "MovieClip" class, for Gnash.
 //
-//   Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+//   Copyright (C) 2009, 2010, 2011, 2012, 2014, 2016
+//   Free Software Foundation, Inc.
 //
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -1607,8 +1608,14 @@ movieclip_lineStyle(const fn_call& fn)
             b = std::uint8_t((rgbval & 0x0000FF) );
         }
         case 1:
+            double thicknessval = toNumber(fn.arg(0), getVM(fn));
+            if (!isFinite(thicknessval) || isNaN(thicknessval)) {
+                // Infinite (including positive infinite) and NaN are treated
+                // as hairline thickness.
+                thicknessval = 0;
+            }
             thickness = std::uint16_t(pixelsToTwips(clamp<float>(
-                            toNumber(fn.arg(0), getVM(fn)), 0, 255)));
+                            thicknessval, 0, 255)));
             break;
     }
 

-----------------------------------------------------------------------

Summary of changes:
 libcore/asobj/MovieClip_as.cpp |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Gnash

_______________________________________________
Gnash-commit mailing list
Gnash-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/gnash-commit
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic