aboutsummaryrefslogtreecommitdiffstats
path: root/epan/range.c
diff options
context:
space:
mode:
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2009-01-20 23:33:38 +0000
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2009-01-20 23:33:38 +0000
commitc8a54b6a6e8fe681b2a7ea3895d90e6860d48265 (patch)
tree65c68e7ce6a86019d6573e318a64517dbf060031 /epan/range.c
parente43ebf0e828b33159c3e8242d8e9ef9e00ea2d4d (diff)
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27281 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/range.c')
-rw-r--r--epan/range.c8
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);
}