[cxml-cvs] CVS update: cxml/xml/xml-parse.lisp

Update of /project/cxml/cvsroot/cxml/xml In directory common-lisp.net:/tmp/cvs-serv912/xml Modified Files: xml-parse.lisp Log Message: *patsch* wieder eine runde eof-bugs erschlagen Date: Sun Nov 27 17:46:50 2005 Author: dlichteblau Index: cxml/xml/xml-parse.lisp diff -u cxml/xml/xml-parse.lisp:1.32 cxml/xml/xml-parse.lisp:1.33 --- cxml/xml/xml-parse.lisp:1.32 Sun Nov 27 17:37:59 2005 +++ cxml/xml/xml-parse.lisp Sun Nov 27 17:46:48 2005 @@ -1506,16 +1506,24 @@ (let ((c (read-rune input))) (check-rune input c #/#) (setq c (read-rune input)) - (cond ((eql c #/x) + (cond ((eql c :eof) + (eox input)) + ((eql c #/x) ;; hexadecimal (setq c (read-rune input)) + (when (eql c :eof) + (eox input)) (unless (digit-rune-p c 16) (wf-error "garbage in character reference")) (prog1 (parse-integer (with-output-to-string (sink) (write-char (rune-char c) sink) - (while (digit-rune-p (setq c (read-rune input)) 16) + (while (progn + (setq c (read-rune input)) + (when (eql c :eof) + (eox input)) + (digit-rune-p c 16)) (write-char (rune-char c) sink))) :radix 16) (check-rune input c #/\;))) @@ -1525,7 +1533,11 @@ (parse-integer (with-output-to-string (sink) (write-char (rune-char c) sink) - (while (rune<= #/0 (setq c (read-rune input)) #/9) + (while (progn + (setq c (read-rune input)) + (when (eql c :eof) + (eox input)) + (rune<= #/0 c #/9)) (write-char (rune-char c) sink))) :radix 10) (check-rune input c #/\;)))
participants (1)
-
dlichteblau@common-lisp.net