Index: /trunk/src/kmk/w32/pathstuff.c
===================================================================
--- /trunk/src/kmk/w32/pathstuff.c	(revision 2453)
+++ /trunk/src/kmk/w32/pathstuff.c	(revision 2454)
@@ -1,5 +1,5 @@
 /* Path conversion for Windows pathnames.
 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-2007 Free Software Foundation, Inc.
+2007, 2009 Free Software Foundation, Inc.
 This file is part of GNU Make.
 
@@ -52,4 +52,7 @@
 
     /* is this a multi-element Path ? */
+    /* FIXME: Perhaps use ":;\"" in strpbrk to convert all quotes to
+       delimiters as well, as a way to handle quoted directories in
+       PATH?  */
     for (p = Path, etok = strpbrk(p, ":;");
          etok;
@@ -77,6 +80,9 @@
                 ;
             etok = strpbrk(p, ":;");        /* find next delimiter */
-            *etok = to_delim;
-            p = ++etok;
+            if (etok) {
+                *etok = to_delim;
+                p = ++etok;
+            } else
+                p += strlen(p);
         } else {
             /* found another one, no drive letter */
