From 876ef226455b9e10ab9a251d13efcfc4a5e9c7df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sat, 4 Feb 2023 22:17:47 +0100 Subject: [PATCH] Fixed #1963 Reading CLIPEVENTFLAGS ClipActionEndFlag on SWF versions >= 6 --- CHANGELOG.md | 2 ++ .../src/com/jpexs/decompiler/flash/SWFInputStream.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd132d5fb2..2f877b13be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file. - [#1960] Hide tag tree root handles as it was in previous versions - [#1964] Freezing on releasing mouse while shape transforming (deadlock) - [#1961] Characters can use characterId 0, PlaceObject can use depth 0 +- [#1963] Reading CLIPEVENTFLAGS ClipActionEndFlag on SWF versions >= 6 ### Changed - [#1960] Quick search does not search in SWF name or folder names @@ -2946,6 +2947,7 @@ All notable changes to this project will be documented in this file. [#1960]: https://www.free-decompiler.com/flash/issues/1960 [#1964]: https://www.free-decompiler.com/flash/issues/1964 [#1961]: https://www.free-decompiler.com/flash/issues/1961 +[#1963]: https://www.free-decompiler.com/flash/issues/1963 [#1029]: https://www.free-decompiler.com/flash/issues/1029 [#1948]: https://www.free-decompiler.com/flash/issues/1948 [#1941]: https://www.free-decompiler.com/flash/issues/1941 diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java index d01e97640d..76ee1d51e4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java @@ -2026,7 +2026,7 @@ public CLIPEVENTFLAGS readCLIPEVENTFLAGS(String name) throws IOException { ret.clipEventPress = readUB(1, "clipEventPress") == 1; ret.clipEventInitialize = readUB(1, "clipEventInitialize") == 1; ret.clipEventData = readUB(1, "clipEventData") == 1; - if (swf.version >= 6) { + if (swf.version >= 6 && available() > 0) { ret.reserved = (int) readUB(5, "reserved"); ret.clipEventConstruct = readUB(1, "clipEventConstruct") == 1; ret.clipEventKeyPress = readUB(1, "clipEventKeyPress") == 1;