diff lisp/calendar/parse-time.el @ 77287:293993a9e1e7

(parse-time-string-chars): Check if CHAR is less than the length of parse-time-syntax.
author Kenichi Handa <handa@m17n.org>
date Wed, 18 Apr 2007 02:32:04 +0000
parents 7a3f13e2dd57
children 93e11478c954 e6fdae9180d4
line wrap: on
line diff
--- a/lisp/calendar/parse-time.el	Tue Apr 17 23:24:13 2007 +0000
+++ b/lisp/calendar/parse-time.el	Wed Apr 18 02:32:04 2007 +0000
@@ -66,7 +66,8 @@
   (aref parse-time-digits char))
 
 (defsubst parse-time-string-chars (char)
-  (aref parse-time-syntax char))
+  (and (< char (length parse-time-syntax))
+       (aref parse-time-syntax char)))
 
 (put 'parse-error 'error-conditions '(parse-error error))
 (put 'parse-error 'error-message "Parsing error")