[prev in list] [next in list] [prev in thread] [next in thread]
List: mutt-dev
Subject: Re: [Mutt] #2515: Sorting by from or to in index is sometimes
From: Mutt <fleas () mutt ! org>
Date: 2007-05-22 9:01:32
Message-ID: 059.4b641645455ab0df1daa627997d8cc8e () mutt ! org
[Download RAW message or body]
#2515: Sorting by from or to in index is sometimes incorrect
Comment (by Christoph Berg):
{{{
# HG changeset patch
# User Christoph Berg <cb@df7cb.de>
# Date 1179397876 -7200
# Node ID 79dcca404278728bbf65995eec4771830a4ec499
# Parent 33af2883d52b99ece0a935818a91293b502603aa
Apply patch by pywatson@gmail.com to strdup strings when sorting.
Closes #1515. (Debian #196545.)
diff -r 33af2883d52b -r 79dcca404278 sort.c
--- a/sort.c Tue May 15 21:05:53 2007 +0200
+++ b/sort.c Thu May 17 12:31:16 2007 +0200
@@ -114,9 +114,10 @@ int compare_to (const void *a, const voi
const char *fa, *fb;
int result;
- fa = mutt_get_name ((*ppa)->env->to);
+ fa = safe_strdup (mutt_get_name ((*ppa)->env->to));
fb = mutt_get_name ((*ppb)->env->to);
result = mutt_strcasecmp (fa, fb);
+ FREE(&fa);
AUXSORT(result,a,b);
return (SORTCODE (result));
}
@@ -128,9 +129,10 @@ int compare_from (const void *a, const v
const char *fa, *fb;
int result;
- fa = mutt_get_name ((*ppa)->env->from);
+ fa = safe_strdup (mutt_get_name ((*ppa)->env->from));
fb = mutt_get_name ((*ppb)->env->from);
result = mutt_strcasecmp (fa, fb);
+ FREE(&fa);
AUXSORT(result,a,b);
return (SORTCODE (result));
}
}}}
--
Ticket URL: <http://dev.mutt.org/trac/ticket/2515#comment:>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic