summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-01-12 21:47:32 +0000
committerRichard M. Stallman <rms@gnu.org>1996-01-12 21:47:32 +0000
commitc7e3338fc087a16ac1d863750b544683b54b0b01 (patch)
tree5623ba39b37aec913708020cc4a537fb56651848 /lisp
parentd5f9a1d1d5cdebf87828a593e2dfbf4dbd6f9317 (diff)
downloademacs-c7e3338fc087a16ac1d863750b544683b54b0b01.tar.gz
(convert-standard-filename): Make sure firstdot is not nil.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/dos-fns.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/dos-fns.el b/lisp/dos-fns.el
index 50e32863602..5efb8a19f56 100644
--- a/lisp/dos-fns.el
+++ b/lisp/dos-fns.el
@@ -1,6 +1,6 @@
;;; dos-fns.el --- MS-Dos specific functions.
-;; Copyright (C) 1991, 1993 Free Software Foundation, Inc.
+;; Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc.
;; Maintainer: Morten Welinder (terra@diku.dk)
;; Keywords: internal
@@ -71,7 +71,7 @@ with a definition that really does change some file names."
(concat (substring string 0 8)
"."
(substring string 8))))
- (setq firstdot (string-match "\\." string))
+ (setq firstdot (or (string-match "\\." string) (1- (length string))))
;; Truncate to 3 chars after the first period.
(if (> (length string) (+ firstdot 4))
(setq string (substring string 0 (+ firstdot 4))))