From: kenh Date: Wed, 9 Feb 2000 16:29:00 +0000 (+0000) Subject: Fix a minor bug in the ack packet printing. X-Git-Tag: tcpdump-3.5.1~358 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/880d6cb4bd1b78aa883ddfa2ec1beea5170fe440 Fix a minor bug in the ack packet printing. --- diff --git a/print-rx.c b/print-rx.c index 0a607843..85639468 100644 --- a/print-rx.c +++ b/print-rx.c @@ -13,7 +13,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-rx.c,v 1.9 2000-02-09 16:00:50 kenh Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-rx.c,v 1.10 2000-02-09 16:29:00 kenh Exp $"; #endif #ifdef HAVE_CONFIG_H @@ -2357,9 +2357,11 @@ rx_ack_print(register const u_char *bp, int length) * the _previous_ packet number seperated * from the first by a dash (-). Since we * already printed the first packet above, - * just print the final packet. + * just print the final packet. Don't + * do this if there will be a single-length + * range. */ - } else if (last == i - 1) + } else if (last == i - 1 && start != last) printf("-%d", rxa->firstPacket + i - 1); /* @@ -2391,7 +2393,7 @@ rx_ack_print(register const u_char *bp, int length) start = i; } last = i; - } else if (last == i - 1) + } else if (last == i - 1 && start != last) printf("-%d", rxa->firstPacket + i - 1); if (last == i - 1 && start != last)