From: David Vázquez Date: Wed, 24 Apr 2013 19:31:31 +0000 (+0100) Subject: parse-integer signals error if junk is detected X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=816d5c731a01cebca42cf0d0a76a75b2f6d9ff09;p=jscl.git parse-integer signals error if junk is detected --- 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)