1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-04 11:40:22 +00:00

* etags.c (TEX_mode): Check getc retruns EOF.

File ended without newline causes infinite loop.
This commit is contained in:
Jan Djärv 2006-08-08 09:33:10 +00:00
parent 878bf4b860
commit 867cc23e44
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2006-08-07 Masatake YAMATO <jet@gyve.org>
* etags.c (TEX_mode): Check getc retruns EOF.
File ended without newline causes infinite loop.
2002-07-30 Adrian Aichner <adrian@xemacs.org> (tiny change)
* etags.c: It's XEmacs, not Xemacs: change all the occurences.

View File

@ -5165,7 +5165,7 @@ TEX_mode (inf)
{
/* Skip to next line if we hit the TeX comment char. */
if (c == '%')
while (c != '\n')
while (c != '\n' && c != EOF)
c = getc (inf);
else if (c == TEX_LESC || c == TEX_SESC )
break;