Fixed #1860 FLA export - EmptyStackException during exporting MorphShapes

This commit is contained in:
Jindra Petřík
2022-11-03 08:27:19 +01:00
parent bddd2dd4e3
commit 62d24e344f
2 changed files with 7 additions and 4 deletions

View File

@@ -2,6 +2,7 @@
All notable changes to this project will be documented in this file.
## [Unreleased]
- [#1860] FLA export - EmptyStackException during exporting MorphShapes
## [16.0.3] - 2022-11-02
### Fixed
@@ -2328,7 +2329,8 @@ All notable changes to this project will be documented in this file.
### Added
- Initial public release
[Unreleased]: https://github.com/jindrapetrik/jpexs-decompiler/compare/version16.0.2...dev
[Unreleased]: https://github.com/jindrapetrik/jpexs-decompiler/compare/version16.0.3...dev
[16.0.3]: https://github.com/jindrapetrik/jpexs-decompiler/compare/version16.0.2...version16.0.3
[16.0.2]: https://github.com/jindrapetrik/jpexs-decompiler/compare/version16.0.1...version16.0.2
[16.0.1]: https://github.com/jindrapetrik/jpexs-decompiler/compare/version16.0.0...version16.0.1
[16.0.0]: https://github.com/jindrapetrik/jpexs-decompiler/compare/version15.1.1...version16.0.0
@@ -2452,6 +2454,7 @@ All notable changes to this project will be documented in this file.
[alpha 9]: https://github.com/jindrapetrik/jpexs-decompiler/compare/alpha8...alpha9
[alpha 8]: https://github.com/jindrapetrik/jpexs-decompiler/compare/alpha7...alpha8
[alpha 7]: https://github.com/jindrapetrik/jpexs-decompiler/releases/tag/alpha7
[#1860]: https://www.free-decompiler.com/flash/issues/1860
[#1817]: https://www.free-decompiler.com/flash/issues/1817
[#1816]: https://www.free-decompiler.com/flash/issues/1816
[#1859]: https://www.free-decompiler.com/flash/issues/1859

View File

@@ -145,6 +145,7 @@ import java.io.StringWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.EmptyStackException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -592,7 +593,6 @@ public class XFLConverter {
if (distance(prevPoint, startPoint) <= maxDistance) { //start and end of the path near => close
prevPoint.x = startPoint.x;
prevPoint.y = startPoint.y;
System.err.println("CLOSED");
}
}
startPoint = currentPoint;
@@ -991,7 +991,7 @@ public class XFLConverter {
if (currentLayer.length() > 0) {
currentLayer.writeEndElement(); // edges
currentLayer.writeEndElement(); // DOMShape
if (currentLayer.length() > 0 && hasEdge) { //no empty layers
layers.add(currentLayer.toString());
}
@@ -2392,7 +2392,7 @@ public class XFLConverter {
} else if (character != null) {
if (character instanceof MorphShapeTag) {
MorphShapeTag m = (MorphShapeTag) character;
convertShape(characters, matrix, 3, m.getStartEdges().shapeRecords, m.getFillStyles().getStartFillStyles(), m.getLineStyles().getStartLineStyles(m.getShapeNum()), true, false, elementsWriter);
convertShape(characters, matrix, m.getShapeNum() == 1 ? 3 : 4, m.getStartEdges().shapeRecords, m.getFillStyles().getStartFillStyles(), m.getLineStyles().getStartLineStyles(m.getShapeNum()), true, false, elementsWriter);
shapeTween = true;
} else {
shapeTween = false;