File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,10 @@ extern "C"
97
97
size_t instructionCount = mlil->GetInstructionCount ();
98
98
99
99
for (size_t i = 0 ; i < instructionCount; ++i) {
100
+ if (i % 100 == 0 && task->IsCancelled ()) {
101
+ break ;
102
+ }
103
+
100
104
auto instr = mlil->GetInstruction (i);
101
105
if (instr.operation != MLIL_IF)
102
106
continue ;
@@ -185,6 +189,10 @@ extern "C"
185
189
std::vector<PatchInfo> pendingPatches;
186
190
187
191
for (size_t i = 0 ; i < mlil->GetInstructionCount (); ++i) {
192
+ if (i % 100 == 0 && shouldCancel.load ()) {
193
+ break ;
194
+ }
195
+
188
196
auto instr = mlil->GetInstruction (i);
189
197
if (instr.operation != MLIL_IF)
190
198
continue ;
@@ -204,6 +212,10 @@ extern "C"
204
212
}
205
213
}
206
214
215
+ if (shouldCancel.load ()) {
216
+ break ;
217
+ }
218
+
207
219
if (pendingPatches.empty ())
208
220
break ;
209
221
You can’t perform that action at this time.
0 commit comments