fixed a big that didn't allow the user to remove item number 0 from their list
parent
7b03218840
commit
91eed7fee9
3
args.rkt
3
args.rkt
|
@ -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))]
|
||||||
|
|
Loading…
Reference in New Issue