aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/rtp_stream_dlg.c
diff options
context:
space:
mode:
authorcmaynard <cmaynard@f5534014-38df-0310-8fa8-9805f1628bb7>2010-11-17 03:29:12 +0000
committercmaynard <cmaynard@f5534014-38df-0310-8fa8-9805f1628bb7>2010-11-17 03:29:12 +0000
commit39f2774f683445820e0569144c7c2cfcec94ac20 (patch)
tree364188d3a603dafea951d4297e0921b0956807d5 /gtk/rtp_stream_dlg.c
parent3881222d908c0ea2e46254c8ec2b11cd8a28d7a7 (diff)
Quote all fields when exporting to CSV. Fixes bug 2811.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34920 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'gtk/rtp_stream_dlg.c')
-rw-r--r--gtk/rtp_stream_dlg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/rtp_stream_dlg.c b/gtk/rtp_stream_dlg.c
index 91138098b7..26184c9243 100644
--- a/gtk/rtp_stream_dlg.c
+++ b/gtk/rtp_stream_dlg.c
@@ -465,7 +465,7 @@ rtpstream_on_copy_as_csv(GtkWindow *win _U_, gpointer data _U_)
for (j=0; j<NUM_COLS-1; j++) {
column = gtk_tree_view_get_column(GTK_TREE_VIEW(list), j);
title = gtk_tree_view_column_get_title(column);
- g_string_append(CSV_str, title);
+ g_string_append_printf(CSV_str, "\"%s\"", title);
if (j<NUM_COLS-2) g_string_append(CSV_str, ",");
}
g_string_append(CSV_str,"\n");
@@ -475,7 +475,7 @@ rtpstream_on_copy_as_csv(GtkWindow *win _U_, gpointer data _U_)
for (i=0; i<streams_nb; i++) {
for (j=0; j<NUM_COLS-1; j++) {
gtk_tree_model_get(GTK_TREE_MODEL(list_store), &iter, j, &table_entry, -1);
- g_string_append(CSV_str,table_entry);
+ g_string_append_printf(CSV_str, "\"%s\"", table_entry);
if (j<NUM_COLS-2) g_string_append(CSV_str,",");
}
g_string_append(CSV_str,"\n");