Skip to content

Commit

Permalink
Fix CallFlags (#1589)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikzhang authored Apr 20, 2020
1 parent 3e2c4dc commit 34962a7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/neo/SmartContract/InteropService.Contract.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,12 @@ private static bool Contract_CallEx(ApplicationEngine engine)
if (!engine.TryPop(out ReadOnlySpan<byte> contractHash)) return false;
if (!engine.TryPop(out string method)) return false;
if (!engine.TryPop(out Array args)) return false;
if (!engine.TryPop(out int flags)) return false;
if (!engine.TryPop(out int flagsValue)) return false;

if (!Enum.IsDefined(typeof(CallFlags), (CallFlags)flags)) return false;
CallFlags flags = (CallFlags)flagsValue;
if ((flags & ~CallFlags.All) != 0) return false;

return Contract_CallEx(engine, new UInt160(contractHash), method, args, (CallFlags)flags);
return Contract_CallEx(engine, new UInt160(contractHash), method, args, flags);
}

private static bool Contract_CallEx(ApplicationEngine engine, UInt160 contractHash, string method, Array args, CallFlags flags)
Expand Down

0 comments on commit 34962a7

Please sign in to comment.