diff options
author | Gerald Combs <gerald@wireshark.org> | 2009-01-20 23:33:38 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2009-01-20 23:33:38 +0000 |
commit | 5ff80e9b5fd3f68a1ab11e2d04c40f6b99eab205 (patch) | |
tree | 65c68e7ce6a86019d6573e318a64517dbf060031 /epan/range.c | |
parent | b82ef98f4b592432ed81342696caafcc099c91e1 (diff) | |
download | wireshark-5ff80e9b5fd3f68a1ab11e2d04c40f6b99eab205.tar.gz wireshark-5ff80e9b5fd3f68a1ab11e2d04c40f6b99eab205.tar.bz2 wireshark-5ff80e9b5fd3f68a1ab11e2d04c40f6b99eab205.zip |
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
Diffstat (limited to 'epan/range.c')
-rw-r--r-- | epan/range.c | 8 |
1 files changed, 5 insertions, 3 deletions
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); } |