Skip to content

Commit 08ca561

Browse files
committed
Fix infinite loop caused by incorrect lastResult handling
1 parent bb808f2 commit 08ca561

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Common/src/main/kotlin/gay/object/hexdebug/debugger/HexDebugger.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,8 @@ class HexDebugger(
435435
var hitBreakpoint = false
436436

437437
while (true) {
438-
val result = executeNextDebugStep(vm, exactlyOnce = true).let { lastResult?.plus(it) ?: it }
438+
var result = executeNextDebugStep(vm, exactlyOnce = true)
439+
if (lastResult != null) result += lastResult
439440
lastResult = result
440441

441442
if (result.reason.stopImmediately) return result

0 commit comments

Comments
 (0)