Change the way we scan past characters before the direction indicator.

svn path=/trunk/; revision=37940
This commit is contained in:
Martin Mathieson 2011-07-08 16:08:32 +00:00
parent 0472f42af7
commit ece553d8d0
1 changed files with 9 additions and 6 deletions

View File

@ -1089,13 +1089,16 @@ static gboolean parse_line(gchar *linebuff, gint line_length,
}
}
/* Scan ahead to the next space */
for (; (linebuff[n] != ' ') && (n+1 < line_length); n++);
if (n+1 >= line_length) {
return FALSE;
/* Skip '/' */
while ((n+1 < line_length) && linebuff[n] == '/') {
n++;
}
/* Skip a space that may happen here */
if ((n+1 < line_length) && linebuff[n] == ' ') {
n++;
}
/* Skip it */
n++;
/* Next character gives direction of message (must be 's' or 'r') */
if (!(*is_comment)) {