Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix infinite loop for unary operator opcodes #131

Merged
merged 1 commit into from
Jul 11, 2023
Merged
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ namespace Echo.Platforms.AsmResolver.Emulation.Dispatch.Arithmetic
/// <summary>
/// Provides a base for unary operator instruction handlers.
/// </summary>
public abstract class UnaryOperatorHandlerBase : ICilOpCodeHandler
public abstract class UnaryOperatorHandlerBase : FallThroughOpCodeHandler
{
/// <inheritdoc />
public CilDispatchResult Dispatch(CilExecutionContext context, CilInstruction instruction)
protected override CilDispatchResult DispatchInternal(CilExecutionContext context, CilInstruction instruction)
{
var value = context.CurrentFrame.EvaluationStack.Pop();
var result = Evaluate(context, instruction, value);
Expand All @@ -18,7 +18,7 @@ public CilDispatchResult Dispatch(CilExecutionContext context, CilInstruction in
}

/// <summary>
/// Evaluates the unary operation on an arguments.
/// Evaluates the unary operation on an argument.
/// </summary>
/// <param name="context">The context to evaluate the instruction in.</param>
/// <param name="instruction">The instruction to dispatch and evaluate.</param>
Expand Down