fixed a big that didn't allow the user to remove item number 0 from their list

main
m455 2019-11-02 15:26:23 -04:00
parent 7b03218840
commit 91eed7fee9
1 changed files with 2 additions and 1 deletions

View File

@ -32,7 +32,8 @@
(equal? args-length 2) (equal? args-length 2)
(equal? (vector-ref args 0) config:remove-command) (equal? (vector-ref args 0) config:remove-command)
(real? (string->number (vector-ref args 1))) (real? (string->number (vector-ref args 1)))
(positive? (string->number (vector-ref args 1))) (or (positive? (string->number (vector-ref args 1)))
(zero? (string->number (vector-ref args 1))))
;; Length subtract one because the numbering starts at zero ;; Length subtract one because the numbering starts at zero
(not (> (string->number (vector-ref args 1)) (sub1 (length (util:file->string-list config:path-to-file))))) (not (> (string->number (vector-ref args 1)) (sub1 (length (util:file->string-list config:path-to-file)))))
(util:remove-item-from-list args))] (util:remove-item-from-list args))]