aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
diff options
context:
space:
mode:
authorMartin Mathieson <martin.r.mathieson@googlemail.com>2011-07-08 16:08:32 +0000
committerMartin Mathieson <martin.r.mathieson@googlemail.com>2011-07-08 16:08:32 +0000
commitece553d8d02c442ac67bcb44117e0ecf9e05ccda (patch)
treece640c1dfd8c49abcf769b0d2f02f485e678a9bc /wiretap
parent0472f42af7fa3a18f986158c0be264dd75953ee2 (diff)
Change the way we scan past characters before the direction indicator.
svn path=/trunk/; revision=37940
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/catapult_dct2000.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/wiretap/catapult_dct2000.c b/wiretap/catapult_dct2000.c
index 91a9067374..dfb318865c 100644
--- a/wiretap/catapult_dct2000.c
+++ b/wiretap/catapult_dct2000.c
@@ -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)) {