Skip to content
Browse files

Fixed bug in return_tagspace.

  • Loading branch information...
1 parent 5b036d8 commit b7c42e1f3fe0af62485c34e22cae52cb266fc074 @thelmuth thelmuth committed
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/clojush/instructions/return.clj
8 src/clojush/instructions/return.clj
@@ -74,6 +74,8 @@
(fn [state]
- (let [top-env (top-item :environment state)
- new-env (assoc top-env :tag (:tag state))]
- (push-item new-env :environment (pop-item :environment state)))))
+ (if (empty? (:environment state))
+ state
+ (let [top-env (top-item :environment state)
+ new-env (assoc top-env :tag (:tag state))]
+ (push-item new-env :environment (pop-item :environment state))))))

0 comments on commit b7c42e1

Please sign in to comment.
Something went wrong with that request. Please try again.