Skip to content

Commit 75172c5

Browse files
committed
Set PE_RUN only when running
1 parent e86a56c commit 75172c5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

qiling/os/uefi/uefi.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def __init__(self, ql: Qiling):
2222
self.entry_point = 0
2323
self.running_module: str
2424
self.in_smm: bool
25-
self.PE_RUN = True
25+
self.PE_RUN: bool
2626
self.heap: QlMemoryHeap # Will be initialized by the loader.
2727

2828
self.on_module_enter: MutableSequence[Callable[[str], bool]] = []
@@ -206,6 +206,8 @@ def run(self):
206206
self.exit_point = self.ql.exit_point
207207

208208
try:
209+
self.PE_RUN = True
210+
209211
self.ql.emu_start(self.ql.loader.entry_point, self.exit_point, self.ql.timeout, self.ql.count)
210212
except KeyboardInterrupt as ex:
211213
self.ql.log.critical(f'Execution interrupted by user')

0 commit comments

Comments
 (0)