Change the way we scan past characters before the direction indicator.
authorMartin Mathieson <martin.r.mathieson@googlemail.com>
Fri, 8 Jul 2011 16:08:32 +0000 (16:08 -0000)
committerMartin Mathieson <martin.r.mathieson@googlemail.com>
Fri, 8 Jul 2011 16:08:32 +0000 (16:08 -0000)
svn path=/trunk/; revision=37940

wiretap/catapult_dct2000.c

index 91a90673742f26c3f3af7b2ca94c418d2ab45ba1..dfb318865cf362aef937202fed8c13347e66d8d9 100644 (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)) {