From 0e08608e0c6c6748f091988aac6fb43503d189ab Mon Sep 17 00:00:00 2001 From: Sergey Bolhovskoy Date: Mon, 22 Dec 2014 11:28:20 +0000 Subject: WhenWasIt: no messages with years when year not set git-svn-id: http://svn.miranda-ng.org/main/trunk@11577 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/WhenWasIt/src/dlg_handlers.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/WhenWasIt/src/dlg_handlers.cpp') diff --git a/plugins/WhenWasIt/src/dlg_handlers.cpp b/plugins/WhenWasIt/src/dlg_handlers.cpp index b69891d543..84cf9ea991 100644 --- a/plugins/WhenWasIt/src/dlg_handlers.cpp +++ b/plugins/WhenWasIt/src/dlg_handlers.cpp @@ -612,14 +612,14 @@ int UpdateBirthdayEntry(HWND hList, MCONTACT hContact, int entry, int bShowAll, mir_sntprintf(buffer, SIZEOF(buffer), NA); ListView_SetItemText(hList, entry, 2, buffer); - if ((year != 0) && (month != 0) && (day != 0)) + if ((month != 0) && (day != 0)) mir_sntprintf(buffer, SIZEOF(buffer), _T("%04d-%02d-%02d"), year, month, day); else mir_sntprintf(buffer, SIZEOF(buffer), NA); ListView_SetItemText(hList, entry, 3, buffer); - if (age < 400) //hopefully noone lives longer than this :) + if (age < 400 && age > 0) //hopefully noone lives longer than this :) mir_sntprintf(buffer, SIZEOF(buffer), _T("%d"), age); else mir_sntprintf(buffer, SIZEOF(buffer), NA); -- cgit v1.2.3