Fix bug: logic for ->URI wasn't handling no-error case right.
authorChris Hanson <org/chris-hanson/cph>
Mon, 14 Jun 2010 03:52:52 +0000 (20:52 -0700)
committerChris Hanson <org/chris-hanson/cph>
Mon, 14 Jun 2010 03:52:52 +0000 (20:52 -0700)
src/runtime/url.scm

index b24c62ed4b2af499e42f98383dfe31d8cf724ebe..b4682f2681ce4fddad29fb09302cfe451a6712b1 100644 (file)
@@ -332,9 +332,11 @@ USA.
   (let* ((do-parse
          (lambda (string)
            (let ((v (*parse-string parser string)))
-             (if (and (not v) caller)
-                 (error:bad-range-argument object caller))
-             (vector-ref v 0))))
+             (if v
+                 (vector-ref v 0)
+                 (begin
+                   (if caller (error:bad-range-argument object caller))
+                   #f)))))
         (do-string
          (lambda (string)
            (or (hash-table/get interned-uris string #f)