From c1befde0c538f52c50df19ea4e17f88e33550767 Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Tue, 12 Dec 2006 14:44:50 +0000 Subject: [PATCH] Fixed "Preset = 0" SVN revision: 1777 --- src/elogd.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/elogd.c b/src/elogd.c index 4841c2e9..c84d3664 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -9388,11 +9388,13 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL year = month = day = 0; if (attrib[index][0]) { ltime = atoi(attrib[index]); - pts = localtime(<ime); - assert(pts); - year = pts->tm_year + 1900; - month = pts->tm_mon + 1; - day = pts->tm_mday; + if (ltime > 0) { + pts = localtime(<ime); + assert(pts); + year = pts->tm_year + 1900; + month = pts->tm_mon + 1; + day = pts->tm_mday; + } } rsprintf("", title);