From 5ff80e9b5fd3f68a1ab11e2d04c40f6b99eab205 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Tue, 20 Jan 2009 23:33:38 +0000 Subject: Use the correct data type for the range string in the Win32 file dialog. Have value_is_in_range() to gracefully handle a NULL range. This might fix bug 3208. svn path=/trunk/; revision=27281 --- epan/range.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'epan/range.c') diff --git a/epan/range.c b/epan/range.c index 16059f6ce5..96745f3cb1 100644 --- a/epan/range.c +++ b/epan/range.c @@ -245,9 +245,11 @@ gboolean value_is_in_range(range_t *range, guint32 val) { guint i; - for (i=0; i < range->nranges; i++) { - if (val >= range->ranges[i].low && val <= range->ranges[i].high) - return TRUE; + if (range) { + for (i=0; i < range->nranges; i++) { + if (val >= range->ranges[i].low && val <= range->ranges[i].high) + return TRUE; + } } return(FALSE); } -- cgit v1.2.1