From 4812ad204e7b63bf9e392a741e5ed0cf4fee1057 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sat, 18 Dec 2021 16:53:10 +0100 Subject: [PATCH] Fixed #1773 - auto set flagWideCodes on FontInfo wide character add --- CHANGELOG.md | 2 ++ .../com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java | 6 +++++- .../com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java | 6 +++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 21cf3f171..fdfa662d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ All notable changes to this project will be documented in this file. - AS3 - insert debug instruction to mark register names even with activation - AS3 - debugging in inner functions - AS1/2 - debugger - rewinding playback to apply breakpoints +- [#1773] - auto set flagWideCodes on FontInfo wide character add ## [15.0.0] - 2021-11-29 ### Added @@ -2346,6 +2347,7 @@ All notable changes to this project will be documented in this file. [#1762]: https://www.free-decompiler.com/flash/issues/1762 [#1763]: https://www.free-decompiler.com/flash/issues/1763 [#1766]: https://www.free-decompiler.com/flash/issues/1766 +[#1773]: https://www.free-decompiler.com/flash/issues/1773 [#1750]: https://www.free-decompiler.com/flash/issues/1750 [#1485]: https://www.free-decompiler.com/flash/issues/1485 [#1681]: https://www.free-decompiler.com/flash/issues/1681 diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java index 860a3c4e4..357495be9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWF; @@ -145,6 +146,9 @@ public class DefineFontInfo2Tag extends FontInfoTag { @Override public void addFontCharacter(int index, int character) { + if (character > 255) { + fontFlagsWideCodes = true; + } codeTable.add(index, character); setModified(true); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java index a97385b99..8966ed84f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.tags; import com.jpexs.decompiler.flash.SWF; @@ -146,6 +147,9 @@ public class DefineFontInfoTag extends FontInfoTag { @Override public void addFontCharacter(int index, int character) { + if (character > 255) { + fontFlagsWideCodes = true; + } codeTable.add(index, character); setModified(true); }