(hashcash-version): return nil when invoked with a
authorTeodor Zlatanov <tzz@lifelogs.com>
Fri, 7 Mar 2003 18:36:39 +0000 (18:36 +0000)
committerTeodor Zlatanov <tzz@lifelogs.com>
Fri, 7 Mar 2003 18:36:39 +0000 (18:36 +0000)
nil token

contrib/ChangeLog
contrib/hashcash.el

index 0c7ad17..f15c151 100644 (file)
@@ -1,7 +1,9 @@
-2003-03-07  Teodor Zlatanov  <tzz@lifelogs.com>
+2003-03-07  Teodor Zlatanov  <tzz@bwh.harvard.edu>
 
        * hashcash.el: New version from Paul Foley with better variable
        names, executable-find support, and no errors in GNU Emacs
+       (hashcash-version): return nil when invoked with a
+       nil token
 
 2003-02-21  Simon Josefsson  <jas@extundo.com>
 
index 44a245d..2eb92d0 100644 (file)
@@ -126,9 +126,11 @@ is used instead.")
   ;;
   ;; Version 1.0 looked like nnnnnrrrrrxxxxxxxxxxxxxxxx
   ;;   This is no longer supported.
-  (cond ((equal (aref token 1) ?:) 1.2)
-       ((equal (aref token 6) ?:) 1.1)
-       (t (error "Unknown hashcash format version"))))
+  (if token
+      (cond ((equal (aref token 1) ?:) 1.2)
+           ((equal (aref token 6) ?:) 1.1)
+           (t (error "Unknown hashcash format version")))
+    nil))
 
 ;;;###autoload
 (defun hashcash-insert-payment (arg)