diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2014-06-24 23:45:02 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2014-06-25 12:35:43 +0200 |
commit | 0529b864b0b2ababd799ee18faf486dbcce68b97 (patch) | |
tree | e2eb2cc780396a8065221d19a29d756d5cd2bcb7 /src/calcurse.h | |
parent | 0b46ad4faaee1ce982a64413b57406e43cb83e88 (diff) | |
download | calcurse-0529b864b0b2ababd799ee18faf486dbcce68b97.zip |
Fix segmentation fault
This adds some more accurate checks to avoid a segmentation fault that
occurred when accessing a nonexistent item.
Fixes GitHub issue #7.
Reported-by: Bromind <martin.vassor@hotmail.fr>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/calcurse.h')
-rw-r--r-- | src/calcurse.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/calcurse.h b/src/calcurse.h index 4b804c3..3c4bcb0 100644 --- a/src/calcurse.h +++ b/src/calcurse.h @@ -713,7 +713,7 @@ unsigned day_chk_busy_slices(struct date, int, int *); struct day_item *day_cut_item(long, int); int day_paste_item(struct day_item *, long); struct day_item *day_get_item(int); -unsigned day_item_count(void); +unsigned day_item_count(int); void day_edit_note(struct day_item *, const char *); void day_view_note(struct day_item *, const char *); void day_item_switch_notify(struct day_item *); |