修复 EvalStackCalculator在Unity 2019的编译错误

dev
walon 2025-06-20 12:09:54 +08:00
parent 8288042e94
commit 4bc6cf923f
1 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,6 @@ using Obfuz.Utils;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using Unity.Properties;
using UnityEngine.Assertions; using UnityEngine.Assertions;
namespace Obfuz.Emit namespace Obfuz.Emit
@ -236,8 +235,9 @@ namespace Obfuz.Emit
var gac = new GenericArgumentContext(methodTypeGenericArgument, methodMethodGenericArgument); var gac = new GenericArgumentContext(methodTypeGenericArgument, methodMethodGenericArgument);
var blockWalkStack = new Stack<BasicBlock>(_basicBlocks.Blocks.Reverse()); var blockWalkStack = new Stack<BasicBlock>(_basicBlocks.Blocks.Reverse());
while (blockWalkStack.TryPop(out BasicBlock block)) while (blockWalkStack.Count > 0)
{ {
BasicBlock block = blockWalkStack.Pop();
EvalStackState state = blockEvalStackStates[block]; EvalStackState state = blockEvalStackStates[block];
if (state.visited) if (state.visited)
continue; continue;