Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/Neo.VM/JumpTable/JumpTable.Compound.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,8 @@ public virtual void NewStruct(ExecutionEngine engine, Instruction instruction)
var n = (int)engine.Pop().GetInteger();
if (n < 0 || n > engine.Limits.MaxStackSize)
throw new InvalidOperationException($"MaxStackSize exceed: {n}");
Struct result = new(engine.ReferenceCounter);
for (var i = 0; i < n; i++)
result.Add(StackItem.Null);
engine.Push(result);

engine.Push(new Struct(engine.ReferenceCounter, Enumerable.Repeat(StackItem.Null, n)));
}

/// <summary>
Expand Down
Loading