Skip to content

Commit

Permalink
Merge branch 'support-byte-asstring' of https://github.com/ShawnYun/n…
Browse files Browse the repository at this point in the history
…eo-devpack-dotnet into support-byte-asstring
  • Loading branch information
Shawn committed Jun 23, 2020
2 parents 2376c21 + 5cdbd88 commit 1d7d97a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Neo.Compiler.MSIL/MSIL/Converter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public NeoModule Convert(ILModule _in, ConvOption option = null)
logger.Log("Insert _initialize().");
}

var attr = outModule.mapMethods.Values.Where(u => u.inSmartContract).Select(u => u.type.attributes.ToArray()).FirstOrDefault();
var attr = outModule.mapMethods.Values.Where(u => u.inSmartContract).Select(u => u.type?.attributes.ToArray()).FirstOrDefault();
if (attr?.Length > 0)
{
outModule.attributes.AddRange(attr);
Expand Down Expand Up @@ -431,8 +431,8 @@ private int ConvertCode(ILMethod method, OpCode src, NeoMethod to)
Convert1by1(VM.OpCode.NOP, src, to);
break;
case CodeEx.Ret:
//return was handled outside
Insert1(VM.OpCode.RET, null, to);
// return was handled outside
Convert1by1(VM.OpCode.RET, src, to);
break;
case CodeEx.Pop:
Convert1by1(VM.OpCode.DROP, src, to);
Expand Down

0 comments on commit 1d7d97a

Please sign in to comment.