From bfb95026039fce785cecded2c3d1f8c461fc6cea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Fri, 18 Jul 2025 18:01:13 +0200 Subject: [PATCH] Fixed: AS3 search slot name Index out of bounds --- CHANGELOG.md | 1 + .../flash/abc/avm2/instructions/InstructionDefinition.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5afb22980..f9188ffae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ All notable changes to this project will be documented in this file. - [#2486] AS ifs with direct breaks (in obfuscated code) - [#2486] AS3 skipping label instruction - Highlighter nullpointer +- AS3 search slot name Index out of bounds ### Changed - Icon of "Deobfuscation options" menu from pile of pills to medkit diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java index 1d45b3b6a..7c18542c4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java @@ -506,9 +506,9 @@ public abstract class InstructionDefinition implements Serializable { Traits traits = null; if (obj instanceof NewActivationAVM2Item) { traits = localData.methodBody.traits; - } else if (obj instanceof ThisAVM2Item) { + } else if (obj instanceof ThisAVM2Item && localData.classIndex > -1) { traits = localData.abc.instance_info.get(localData.classIndex).instance_traits; - } else if (obj instanceof ClassAVM2Item) { + } else if (obj instanceof ClassAVM2Item && localData.classIndex > -1) { traits = localData.abc.class_info.get(localData.classIndex).static_traits; } else if (obj instanceof GlobalAVM2Item) { traits = localData.abc.script_info.get(localData.scriptIndex).traits;