~ chicken-core (chicken-5) 146a8fa7e1881cdbff796034be690eb67084618f


commit 146a8fa7e1881cdbff796034be690eb67084618f
Author:     Peter Bex <peter@more-magic.net>
AuthorDate: Sat Nov 9 16:52:36 2019 +0100
Commit:     Evan Hanson <evhan@foldling.org>
CommitDate: Mon Nov 11 21:02:30 2019 +1300

    Fix crash in decompose-directory on Windows
    
    We took the ##sys#size of a fixnum, which is incorrect.
    
    Signed-off-by: Evan Hanson <evhan@foldling.org>

diff --git a/NEWS b/NEWS
index 3f941aed..9f59849f 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,8 @@
   - The procedures `record-printer` and `set-record-printer!` and a
     corresponding SRFI-17 setter have been added. These deprecate
     `define-record-printer` which isn't a "real" definition (see #1294).
+  - On Windows, `decompose-directory` no longer crashes when a drive
+    letter is present in the supplied path string.
 
 - Runtime system
   - Quoted empty keywords like ||: and :|| are now read like prescribed
diff --git a/pathname.scm b/pathname.scm
index dd2ab467..3c58f688 100644
--- a/pathname.scm
+++ b/pathname.scm
@@ -318,7 +318,7 @@
                 ; else is a prefix
                 (let ((rst (cdr decomp))
                       (elen (##sys#size 1st)))
-                  (if (fx= olen (##sys#size elen))
+                  (if (fx= olen elen)
                       ; then origin is a list prefix
                       rst
                       ; else origin is a string prefix
Trap