aboutsummaryrefslogtreecommitdiffstats
path: root/epan/prefs.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2010-01-11 08:00:56 +0000
committerAnders Broman <anders.broman@ericsson.com>2010-01-11 08:00:56 +0000
commit759c418158ced842286de98d4a5393a100333149 (patch)
tree38be69123210e0d914140c04449aef0bb45f08c4 /epan/prefs.c
parent79a21b067ceda6d4888d12e980c992d82a92eff3 (diff)
From Jim Young:
Patch to write "column.format:" preference values pairs to separate lines. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4380 svn path=/trunk/; revision=31487
Diffstat (limited to 'epan/prefs.c')
-rw-r--r--epan/prefs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/epan/prefs.c b/epan/prefs.c
index ab144d9f72..1b9788a8a9 100644
--- a/epan/prefs.c
+++ b/epan/prefs.c
@@ -907,8 +907,10 @@ put_string_list(GList *sl)
size_t str_len;
gchar *strp, *quoted_strp, c;
size_t fmt_len;
+ guint item_count = 0;
while (clp) {
+ item_count++;
str = clp->data;
/* Allocate a buffer big enough to hold the entire string, with each
@@ -930,7 +932,7 @@ put_string_list(GList *sl)
fmt_len = strlen(quoted_str) + 4;
if ((fmt_len + cur_len) < (MAX_FMT_PREF_LEN - 1)) {
- if ((fmt_len + cur_pos) > MAX_FMT_PREF_LINE_LEN) {
+ if (item_count % 2) {
/* Wrap the line. */
cur_len--;
cur_pos = 0;