Fix vector/_set
This makes it so that `vector/_set` returns `:ignore-instruction` if the given vector is empty.
This commit is contained in:
parent
2ffffa9fd4
commit
7613f18c70
@ -211,8 +211,10 @@
|
||||
(let [lit-stack (get-vector-literal-type stack)]
|
||||
(make-instruction state
|
||||
(fn [lit n vect]
|
||||
(assoc vect (mod n (count vect)) lit))
|
||||
[:integer lit-stack stack]
|
||||
(if (empty? vect)
|
||||
:ignore-instruction
|
||||
(assoc vect (mod n (count vect)) lit)))
|
||||
[lit-stack :integer stack]
|
||||
stack))))
|
||||
|
||||
;; Pushes a subvector of the top item, with start and end indices determined by
|
||||
|
Loading…
x
Reference in New Issue
Block a user