From e5cccef1a29a7df0698cdd9f08f8d53d091ef6a5 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Sat, 14 Jun 2014 15:53:12 +0200 Subject: [PATCH] Check for empty string after mangling and trimming Signed-off-by: Sven Strickroth --- src/Utils/MiscUI/HistoryCombo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Utils/MiscUI/HistoryCombo.cpp b/src/Utils/MiscUI/HistoryCombo.cpp index 634311c01..6c6da7b22 100644 --- a/src/Utils/MiscUI/HistoryCombo.cpp +++ b/src/Utils/MiscUI/HistoryCombo.cpp @@ -113,13 +113,13 @@ int CHistoryCombo::AddString(CString str, INT_PTR pos,BOOL isSel) if (pos < 0) pos = GetCount(); - if (m_bTrim) - str.Trim(_T(" ")); CString combostring = str; combostring.Replace('\r', ' '); combostring.Replace('\n', ' '); if (m_bTrim) combostring.Trim(); + if (combostring.IsEmpty()) + return -1; //search the Combo for another string like this //and do not insert if found -- 2.11.4.GIT