mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-27 13:54:49 +00:00
handleSetMember crashed while decompiling AS2 code that applies `--` to a virtual (`__get__`/`__set__`) property, e.g. `this.prop--` where `prop` is defined via addProperty. The decrement-setter branch built a PreDecrementActionItem but cast the value to IncrementActionItem instead of DecrementActionItem, throwing ClassCastException. That exception was then masked: it propagated into the finally block before addToOutput ran, so `output` was empty and `output.remove(output.size() - 1)` threw IndexOutOfBoundsException, replacing the real cause. The reported error was therefore always a misleading "Index -1 out of bounds for length 0", which also aborts loading entirely when "automatically rename identifiers" is enabled (deobfuscateIdentifiers decompiles every script on load). Fixes: - Cast value to DecrementActionItem in the PreDecrement setter branch. - Guard the finally against an empty output (mirrors cleanupTemp) so a future exception in the try block is no longer masked. Affected code now decompiles correctly to `++prop` / `--prop`.