[cmucl-cvs] [git] CMU Common Lisp branch master updated. snapshot-2012-04-13-gd31743b
Raymond Toy
rtoy at common-lisp.net
Wed Apr 25 22:10:25 UTC 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMU Common Lisp".
The branch, master has been updated
via d31743b1d345c7c43b6a00324ab400c1d00f78f8 (commit)
from 0fc0af1244e50b554f54de4122266d72c924e110 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d31743b1d345c7c43b6a00324ab400c1d00f78f8
Author: Raymond Toy <toy.raymond at gmail.com>
Date: Wed Apr 25 13:48:32 2012 -0700
Handle case where we run out of octets in the middle of a two-octet
code.
diff --git a/src/pcl/simple-streams/external-formats/euc-kr.lisp b/src/pcl/simple-streams/external-formats/euc-kr.lisp
index 81dd7d3..2d1a92a 100644
--- a/src/pcl/simple-streams/external-formats/euc-kr.lisp
+++ b/src/pcl/simple-streams/external-formats/euc-kr.lisp
@@ -975,15 +975,13 @@ character and illegal outputs are replaced by a question mark.")
(cond ((null ,c) (values nil 0))
((<= ,c #x7f) (values ,c 1))
((<= #xa1 ,c #xfd)
+ ;; Remember first octet in case we bail out reading the
+ ;; second octet (for octets-to-string).
+ (setf ,state ,c)
(let ((,c2 ,input))
- (cond ((null ,c2)
- (,unput 1)
- (values
- (if ,error
- (funcall ,error "Invalid second octet: #x~X 1" ,c2 1)
- +replacement-character-code+)
- 1))
- ((<= #xa1 ,c2 #xfe)
+ (cond ((<= #xa1 ,c2 #xfe)
+ ;; Read the second octet, so clear the state
+ (setf ,state nil)
(values (aref ,table (- ,c2 #xa1) (- ,c #xa1)) 2))
(t
(values
-----------------------------------------------------------------------
Summary of changes:
.../simple-streams/external-formats/euc-kr.lisp | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
hooks/post-receive
--
CMU Common Lisp
More information about the cmucl-cvs
mailing list