mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-13 22:48:53 +00:00
Fixed #1954 Incorrect calculation of empty button bounds causing OutOfMemory
This commit is contained in:
@@ -15,6 +15,7 @@ All notable changes to this project will be documented in this file.
|
||||
- [#1951] Renaming invalid identifiers with existing string collisions
|
||||
- [#1888] String casts - ConvertS on XML, XMLList
|
||||
- [#1953] Save as EXE - add file extension when missing
|
||||
- [#1954] Incorrect calculation of empty button bounds causing OutOfMemory
|
||||
|
||||
## [18.3.3] - 2023-01-22
|
||||
### Added
|
||||
@@ -2923,6 +2924,7 @@ All notable changes to this project will be documented in this file.
|
||||
[#1951]: https://www.free-decompiler.com/flash/issues/1951
|
||||
[#1888]: https://www.free-decompiler.com/flash/issues/1888
|
||||
[#1953]: https://www.free-decompiler.com/flash/issues/1953
|
||||
[#1954]: https://www.free-decompiler.com/flash/issues/1954
|
||||
[#1913]: https://www.free-decompiler.com/flash/issues/1913
|
||||
[#1894]: https://www.free-decompiler.com/flash/issues/1894
|
||||
[#1801]: https://www.free-decompiler.com/flash/issues/1801
|
||||
|
||||
@@ -207,6 +207,7 @@ public class DefineButton2Tag extends ButtonTag implements ASMSourceContainer {
|
||||
}
|
||||
|
||||
RECT rect = new RECT(Integer.MAX_VALUE, Integer.MIN_VALUE, Integer.MAX_VALUE, Integer.MIN_VALUE);
|
||||
boolean foundSomething = false;
|
||||
for (BUTTONRECORD r : characters) {
|
||||
CharacterTag ch = swf.getCharacter(r.characterId);
|
||||
if (ch instanceof BoundedTag) {
|
||||
@@ -223,9 +224,14 @@ public class DefineButton2Tag extends ButtonTag implements ASMSourceContainer {
|
||||
rect.Ymin = Math.min(r2.Ymin, rect.Ymin);
|
||||
rect.Xmax = Math.max(r2.Xmax, rect.Xmax);
|
||||
rect.Ymax = Math.max(r2.Ymax, rect.Ymax);
|
||||
foundSomething = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!foundSomething) {
|
||||
rect = new RECT();
|
||||
}
|
||||
|
||||
if (cache != null) {
|
||||
cache.put(this, rect);
|
||||
|
||||
@@ -195,6 +195,7 @@ public class DefineButtonTag extends ButtonTag implements ASMSourceContainer {
|
||||
}
|
||||
|
||||
RECT rect = new RECT(Integer.MAX_VALUE, Integer.MIN_VALUE, Integer.MAX_VALUE, Integer.MIN_VALUE);
|
||||
boolean foundSomething = false;
|
||||
for (BUTTONRECORD r : characters) {
|
||||
CharacterTag ch = swf.getCharacter(r.characterId);
|
||||
if (ch instanceof BoundedTag) {
|
||||
@@ -211,10 +212,15 @@ public class DefineButtonTag extends ButtonTag implements ASMSourceContainer {
|
||||
rect.Ymin = Math.min(r2.Ymin, rect.Ymin);
|
||||
rect.Xmax = Math.max(r2.Xmax, rect.Xmax);
|
||||
rect.Ymax = Math.max(r2.Ymax, rect.Ymax);
|
||||
foundSomething = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!foundSomething) {
|
||||
rect = new RECT();
|
||||
}
|
||||
|
||||
if (cache != null) {
|
||||
cache.put(this, rect);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user