diff options
author | Richard M. Stallman <rms@gnu.org> | 1995-06-21 19:46:58 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1995-06-21 19:46:58 +0000 |
commit | e15d083c61821df98892bb4c1ea8251471bda24d (patch) | |
tree | 5903dcfa48ab565d60f1b503160e20c78da2a32d /lib-src/make-docfile.c | |
parent | bb39fd49adad1de19a34cab2bf28646db8e30960 (diff) | |
download | emacs-e15d083c61821df98892bb4c1ea8251471bda24d.tar.gz |
(scan_file): Make sure it never looks at filename[-1].
Diffstat (limited to 'lib-src/make-docfile.c')
-rw-r--r-- | lib-src/make-docfile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 948a7257089..f647c21deaa 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -177,9 +177,9 @@ scan_file (filename) char *filename; { int len = strlen (filename); - if (!strcmp (filename + len - 4, ".elc")) + if (len > 4 && !strcmp (filename + len - 4, ".elc")) return scan_lisp_file (filename, READ_BINARY); - else if (!strcmp (filename + len - 3, ".el")) + else if (len > 3 && !strcmp (filename + len - 3, ".el")) return scan_lisp_file (filename, READ_TEXT); else return scan_c_file (filename, READ_TEXT); |