diff options
author | Guy Harris <guy@alum.mit.edu> | 2012-01-24 00:48:48 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2012-01-24 00:48:48 +0000 |
commit | 7a3653b9c8e348da6685713a0a72113f4c2e6642 (patch) | |
tree | d672149a7995fe10af444efa451aa9b73a0ac73d /ui | |
parent | 3b1f82d06345b7f6979a1d5bf70bad7dc247889e (diff) |
Don't treate WTAP_FILE_UNKNOWN as a real file type.
svn path=/trunk/; revision=40679
Diffstat (limited to 'ui')
-rw-r--r-- | ui/win32/file_dlg_win32.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/win32/file_dlg_win32.c b/ui/win32/file_dlg_win32.c index 1bf4284470..089a001109 100644 --- a/ui/win32/file_dlg_win32.c +++ b/ui/win32/file_dlg_win32.c @@ -1407,6 +1407,8 @@ file_type_from_list_index(gboolean save, int index) { /* Check all file types. */ curr_index = 0; for (ft = 0; ft < WTAP_NUM_FILE_TYPES; ft++) { + if (ft == WTAP_FILE_UNKNOWN) + continue; /* not a real file type */ if (save && (!packet_range_process_all(&g_range) || ft != cfile.cd_t)) { /* not all unfiltered packets or a different file type. We have to use Wiretap. */ if (!can_save_with_wiretap(ft)) @@ -1464,6 +1466,9 @@ build_file_type_list(gboolean save, int *item_to_select) { /* Check all file types. */ index = 1; /* the index is one based! */ for (ft = 0; ft < WTAP_NUM_FILE_TYPES; ft++) { + if (ft == WTAP_FILE_UNKNOWN) + continue; /* not a real file type */ + if (save && (!packet_range_process_all(&g_range) || ft != cfile.cd_t)) { /* not all unfiltered packets or a different file type. We have to use Wiretap. */ if (!can_save_with_wiretap(ft)) @@ -1542,6 +1547,9 @@ build_file_format_list(HWND sf_hwnd) { /* Check all file types. */ index = 0; for (ft = 0; ft < WTAP_NUM_FILE_TYPES; ft++) { + if (ft == WTAP_FILE_UNKNOWN) + continue; /* not a real file type */ + if (!packet_range_process_all(&g_range) || ft != cfile.cd_t) { /* not all unfiltered packets or a different file type. We have to use Wiretap. */ if (!can_save_with_wiretap(ft)) |