changeset 14162:15ea2a83edae

(convert-standard-filename): Make sure firstdot is not nil.
author Richard M. Stallman <rms@gnu.org>
date Fri, 12 Jan 1996 21:47:32 +0000
parents 670721a540c8
children 2422ceecd9d2
files lisp/dos-fns.el
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/dos-fns.el	Fri Jan 12 21:43:15 1996 +0000
+++ b/lisp/dos-fns.el	Fri Jan 12 21:47:32 1996 +0000
@@ -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 @@
 	      (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))))