]> git.eshelyaron.com Git - emacs.git/commitdiff
(parse-time-string-chars): Check if CHAR is less than the length of
authorKenichi Handa <handa@m17n.org>
Wed, 18 Apr 2007 02:32:04 +0000 (02:32 +0000)
committerKenichi Handa <handa@m17n.org>
Wed, 18 Apr 2007 02:32:04 +0000 (02:32 +0000)
parse-time-syntax.

lisp/calendar/parse-time.el

index 4a786da772670058e24da50c1d98210bdde4c218..0913bc92160bee0b74b7b0e9e7f7fcc41c3457f2 100644 (file)
@@ -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")