Commit 59009bf7 authored by Brian Guadalupe's avatar Brian Guadalupe

Fixed program line indicator to not advance to the next line when program halts

parent 83c5edff
...@@ -166,13 +166,12 @@ ...@@ -166,13 +166,12 @@
(define line-before (tm-config-line-no tm)) (define line-before (tm-config-line-no tm))
(define stmt (vector-ref (tm-config-program tm) (tm-config-line-no tm))) (define stmt (vector-ref (tm-config-program tm) (tm-config-line-no tm)))
(execute-statement! tm stmt) (execute-statement! tm stmt)
(when (not (eq? (tm-config-state tm) 'running)) (void)) (when (eq? (tm-config-state tm) 'running)
(when (= line-before (tm-config-line-no tm))
(when (= line-before (tm-config-line-no tm))
(go-to-next-line! tm)) (go-to-next-line! tm))
(when (and (>= (tm-config-line-no tm) (tm-config-last-line-no tm)) (when (>= (tm-config-line-no tm) (tm-config-last-line-no tm))
(eq? (tm-config-state tm) 'running))
(set-tm-config-state! tm 'reject))))) (set-tm-config-state! tm 'reject))))))
(define MAX-STEPS 100000) ; 100k steps should be enough (define MAX-STEPS 100000) ; 100k steps should be enough
;(define MAX-STEPS 10000000) ;(define MAX-STEPS 10000000)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment