# HG changeset patch # User Richard M. Stallman # Date 821483252 0 # Node ID 15ea2a83edae9a7529c33089fcc2530d3ac24a1d # Parent 670721a540c86f917d8296e32d79d388ce6ba557 (convert-standard-filename): Make sure firstdot is not nil. diff -r 670721a540c8 -r 15ea2a83edae lisp/dos-fns.el --- 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))))