From 816d5c731a01cebca42cf0d0a76a75b2f6d9ff09 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20V=C3=A1zquez?= Date: Wed, 24 Apr 2013 20:31:31 +0100 Subject: [PATCH] parse-integer signals error if junk is detected --- ecmalisp.lisp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ecmalisp.lisp b/ecmalisp.lisp index bcdf2dd..b549726 100644 --- a/ecmalisp.lisp +++ b/ecmalisp.lisp @@ -1200,7 +1200,11 @@ #+ecmalisp (defun parse-integer (string &key junk-allowed) - (!parse-integer string junk-allowed)) + (multiple-value-bind (num index) + (!parse-integer string junk-allowed) + (when num + (values num index) + (error "junk detected.")))) (defvar *eof* (gensym)) (defun ls-read (stream) -- 1.7.10.4