aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2004-08-18 21:05:38 +0000
committerGerald Combs <gerald@wireshark.org>2004-08-18 21:05:38 +0000
commite986e98f0a690092dcf686cc02a4297cc9397e30 (patch)
tree016c5f21207d4d418d1bed6da286bd38d61d77ab /file.c
parenta013213e216d3d2bc151e3f90fbecc98fe7e5fd7 (diff)
If you mark all frames, then unmark all frames "marked_count" overflows.
Keep this from happening. svn path=/trunk/; revision=11771
Diffstat (limited to 'file.c')
-rw-r--r--file.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/file.c b/file.c
index 0b8ea83070..b0e6890610 100644
--- a/file.c
+++ b/file.c
@@ -2777,7 +2777,8 @@ void
mark_frame(capture_file *cf, frame_data *frame)
{
frame->flags.marked = TRUE;
- cf->marked_count++;
+ if (cf->count > cf->marked_count)
+ cf->marked_count++;
}
/*
@@ -2787,7 +2788,8 @@ void
unmark_frame(capture_file *cf, frame_data *frame)
{
frame->flags.marked = FALSE;
- cf->marked_count--;
+ if (cf->marked_count > 0)
+ cf->marked_count--;
}
typedef struct {