Fixed "Preset <date-attr> = 0"

SVN revision: 1777
This commit is contained in:
Stefan Ritt 2006-12-12 14:44:50 +00:00
parent d3aee3f3e6
commit c1befde0c5

View File

@ -9388,12 +9388,14 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
year = month = day = 0; year = month = day = 0;
if (attrib[index][0]) { if (attrib[index][0]) {
ltime = atoi(attrib[index]); ltime = atoi(attrib[index]);
if (ltime > 0) {
pts = localtime(&ltime); pts = localtime(&ltime);
assert(pts); assert(pts);
year = pts->tm_year + 1900; year = pts->tm_year + 1900;
month = pts->tm_mon + 1; month = pts->tm_mon + 1;
day = pts->tm_mday; day = pts->tm_mday;
} }
}
rsprintf("<td%s class=\"attribvalue\">", title); rsprintf("<td%s class=\"attribvalue\">", title);
sprintf(str, "%d", index); sprintf(str, "%d", index);