diff options
author | Frederic Culot <calcurse@culot.org> | 2007-05-06 13:33:06 +0000 |
---|---|---|
committer | Frederic Culot <calcurse@culot.org> | 2007-05-06 13:33:06 +0000 |
commit | bfecd760b8a428eecd5978057253d3e783f84e62 (patch) | |
tree | 14a4ce2343a44471f9325c426b580cca9433c17c /src | |
parent | d89344683c6ece0f64f9160c72cbfa5ec2412bd8 (diff) | |
download | calcurse-bfecd760b8a428eecd5978057253d3e783f84e62.tar.gz calcurse-bfecd760b8a428eecd5978057253d3e783f84e62.zip |
bugfix: item ending time is now assigned to correct day in day_edit_item()
Diffstat (limited to 'src')
-rwxr-xr-x | src/day.c | 16 |
1 files changed, 6 insertions, 10 deletions
@@ -1,4 +1,4 @@ -/* $calcurse: day.c,v 1.21 2007/04/04 19:38:18 culot Exp $ */ +/* $calcurse: day.c,v 1.22 2007/05/06 13:33:06 culot Exp $ */ /* * Calcurse - text-based organizer @@ -502,15 +502,11 @@ day_edit_item(int year, int month, int day, int item_num) p->start + p->appt_dur); sscanf(timestr, "%u:%u", &hr, &mn); free(timestr); - newtime = update_time_in_date( - p->start + p->appt_dur, hr, mn); - if (newtime > p->start) { - p->appt_dur = newtime - p->start; - valid_date = 1; - } else { - status_mesg(error_msg, enter_str); - wgetch(swin); - } + newtime = update_time_in_date(p->start, hr, mn); + p->appt_dur = (newtime > p->start) ? + newtime - p->start : + DAYINSEC + newtime - p->start; + valid_date = 1; } break; case DESC: |