gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-


From: Sandro Santilli
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-2265-g982270f
Date: Mon, 22 Feb 2016 09:09:47 +0000

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 <address@hidden>
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



reply via email to

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