Merge changes from emacs-23 branch
[bpt/emacs.git] / lib-src / ebrowse.c
index 1fcbb86..81067a9 100644 (file)
@@ -1700,6 +1700,11 @@ yylex (void)
             case '/':
              while (GET (c) && c != '\n')
                ;
+             /* Don't try to read past the end of the input buffer if
+                the file ends in a C++ comment without a newline.  */
+             if (c == 0)
+               return YYEOF;
+
              INCREMENT_LINENO;
              break;