changeset 34996:271ffc04a20d

(convert-standard-filename): Do length check on name before aref.
author Andrew Innes <andrewi@gnu.org>
date Tue, 02 Jan 2001 22:38:06 +0000
parents 2fa4bcb413d9
children 1fff4c29a492
files lisp/w32-fns.el
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/w32-fns.el	Tue Jan 02 20:34:49 2001 +0000
+++ b/lisp/w32-fns.el	Tue Jan 02 22:38:06 2001 +0000
@@ -257,7 +257,8 @@
   (let ((name (copy-sequence filename))
 	(start 0))
     ;; leave ':' if part of drive specifier
-    (if (eq (aref name 1) ?:)
+    (if (and (> (length name) 1)
+	     (eq (aref name 1) ?:))
 	(setq start 2))
     ;; destructively replace invalid filename characters with !
     (while (string-match "[?*:<>|\"\000-\037]" name start)