+2002-01-09 Bruno Haible <bruno@clisp.org>
+
+ * x-java.l (strip_ending_spaces): Fix logic.
+
+2002-01-09 Tommy Johansson <tommy.johansson@kanalen.org>
+
+ * x-java.l: Avoid endless loop when encountering unterminated string.
+
2002-01-08 Bruno Haible <bruno@clisp.org>
* message.h (format_type): New enum value 'format_elisp'.
{
int len = strlen (str);
- while (isspace ((unsigned char) str[len--]))
- ;
+ while (len > 0 && isspace ((unsigned char) str[len - 1]))
+ len--;
str[len] = '\0';
}
%}
int c;
char *str;
char_buf *charbuf = create_char_buf ();
- while ((c = input ()) != '"')
+ while ((c = input ()) != EOF && c != '"')
{
update_line_no (c);
append_char_buf (charbuf, c);