From 795a6aeebbe0e2b286adc30f867b3b38d9a83c3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Wed, 5 Nov 2014 06:08:21 +0100 Subject: [PATCH] return type fix --- .../com/jpexs/decompiler/flash/abc/types/MethodInfo.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MethodInfo.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MethodInfo.java index bfd9400bf..dfa4dc4fc 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MethodInfo.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MethodInfo.java @@ -323,9 +323,12 @@ public class MethodInfo { } public GraphTextWriter getReturnTypeStr(GraphTextWriter writer, AVM2ConstantPool constants, List fullyQualifiedNames) { - String rname = constants.getMultiname(ret_type).getName(constants, fullyQualifiedNames, true); - rname = IdentifiersDeobfuscation.printIdentifier(true,rname,"void"); - return writer.hilightSpecial(ret_type == 0 ? "*" : rname, "returns"); + String rname = "*"; + if(ret_type>0){ + constants.getMultiname(ret_type).getName(constants, fullyQualifiedNames, true); + rname = IdentifiersDeobfuscation.printIdentifier(true,rname,"void"); + } + return writer.hilightSpecial(rname, "returns"); } public void setBody(MethodBody body) {