X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=history.c;h=bfbe60f197e3b8e0441f19a8a09b63fbbe324382;hp=7323c77f77705161fa8a540f2b0a3534e2dd9d0c;hb=f70e0d5b479d4917b97d5e1e50f9276dcd51cad3;hpb=c3e57678c8be193fc137854020f3a90887be97c9 diff --git a/history.c b/history.c index 7323c77..bfbe60f 100644 --- a/history.c +++ b/history.c @@ -13,6 +13,7 @@ #include "mutt.h" #include "history.h" +#include "lib/mem.h" /* global vars used for the string-history routines */ @@ -69,8 +70,8 @@ void mutt_history_add (history_class_t hclass, const char *s) prev = h->last - 1; if (prev < 0) prev = HistSize - 1; - if (!h->hist[prev] || mutt_strcmp (h->hist[prev], s) != 0) { - mutt_str_replace (&h->hist[h->last++], s); + if (!h->hist[prev] || safe_strcmp (h->hist[prev], s) != 0) { + str_replace (&h->hist[h->last++], s); if (h->last > HistSize - 1) h->last = 0; }