From 0e8910a9e8ef449e8ad080931b11818f60c65c91 Mon Sep 17 00:00:00 2001 From: Eitaro Fukamachi Date: Tue, 7 Apr 2015 16:19:19 +0900 Subject: [PATCH] Return the last value in with-{string,octets}-parsing. --- src/proc-parse.lisp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/proc-parse.lisp b/src/proc-parse.lisp index 3ee8157..1944b74 100644 --- a/src/proc-parse.lisp +++ b/src/proc-parse.lisp @@ -338,8 +338,7 @@ (when (eofp) (go :eof)) (setq ,elem (aref ,data ,p)) - ,@body - (return-from ,body-block ,p) + (return-from ,body-block (progn ,@body)) :eof))))))) (defmacro with-octets-parsing ((data &key start end) &body body) @@ -400,8 +399,7 @@ (when (eofp) (go :eof)) (setq ,elem (aref ,data ,p)) - ,@body - (return-from ,body-block ,p) + (return-from ,body-block (progn ,@body)) :eof))))))) (defmacro with-vector-parsing ((data &key (start 0) end) &body body &environment env)