stopped user from being able to remove a number that isn't in the list

main
m455 2018-04-21 09:11:02 -04:00
parent 64681f005e
commit a6fb9c3d29
1 changed files with 4 additions and 1 deletions

View File

@ -1,6 +1,7 @@
#lang racket/base #lang racket/base
(require racket/vector (require racket/vector
racket/list
"config.rkt" "config.rkt"
"init.rkt" "init.rkt"
"util.rkt" "util.rkt"
@ -27,7 +28,9 @@
[(and [(and
(equal? args-length 2) (equal? args-length 2)
(equal? (vector-member remove-command args) 0)) (equal? (vector-member remove-command args) 0)
(not (equal? (vector-member "0" args) 1))
(vector-member (vector-ref args 1) (list->vector (map number->string (range (length (file->string-list path)))))))
(remove-item args)] (remove-item args)]
[(and [(and