[cl-irc-cvs] r156 - trunk

ehuelsmann at common-lisp.net ehuelsmann at common-lisp.net
Tue May 16 04:55:52 UTC 2006


Author: ehuelsmann
Date: Tue May 16 00:55:51 2006
New Revision: 156

Modified:
   trunk/parse-message.lisp
   trunk/utility.lisp
Log:
Fix the hasty fix.

Modified: trunk/parse-message.lisp
==============================================================================
--- trunk/parse-message.lisp	(original)
+++ trunk/parse-message.lisp	Tue May 16 00:55:51 2006
@@ -58,7 +58,8 @@
   "Assuming `string' is a valid IRC message this function returns the
 trailing-argument part of the message.  Returns nil if the
 trailing-argument part is not present."
-  (cut-between string #\: '(#\Return) :start start :cut-to-end t))
+  (when (< start (length string))
+    (cut-between string #\: '(#\Return) :start start :cut-to-end t)))
 
 (defun combine-arguments-and-trailing (string &key (start 0))
   (multiple-value-bind

Modified: trunk/utility.lisp
==============================================================================
--- trunk/utility.lisp	(original)
+++ trunk/utility.lisp	Tue May 16 00:55:51 2006
@@ -146,7 +146,7 @@
 
 (defun substring (string start &optional end)
   (let* ((end-index (if end end (length string)))
-         (seq-len (1- (- end-index start))))
+         (seq-len (- end-index start)))
     (make-array seq-len
                 :element-type (array-element-type string)
                 :displaced-to string



More information about the cl-irc-cvs mailing list