diff options
author | Frederic Culot <calcurse@culot.org> | 2009-05-22 19:59:17 +0000 |
---|---|---|
committer | Frederic Culot <calcurse@culot.org> | 2009-05-22 19:59:17 +0000 |
commit | 3f6aff84e65e7650f7110768646b86ece6b4dc8f (patch) | |
tree | e6fe92b787c413f7e005eda32050acd5b76cceef /src/event.c | |
parent | bb586b92b5714d1f33da2518206c364146de081b (diff) | |
download | calcurse-3f6aff84e65e7650f7110768646b86ece6b4dc8f.zip |
The buffer should be allocated dynamically, but I am quite busy right now :'( Anyway, thanks Kamil for feedback
Diffstat (limited to 'src/event.c')
-rwxr-xr-x | src/event.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/event.c b/src/event.c index 8009054..c05e0f1 100755 --- a/src/event.c +++ b/src/event.c @@ -1,4 +1,4 @@ -/* $calcurse: event.c,v 1.12 2009/01/03 21:32:11 culot Exp $ */ +/* $calcurse: event.c,v 1.13 2009/05/22 19:59:18 culot Exp $ */ /* * Calcurse - text-based organizer @@ -141,14 +141,14 @@ event_write (struct event_s *o, FILE *f) struct event_s * event_scan (FILE *f, struct tm start, int id, char *note) { - char buf[MESG_MAXSIZE], *nl; + char buf[BUFSIZ], *nl; time_t tstart, t; t = time (NULL); (void)localtime (&t); /* Read the event description */ - (void)fgets (buf, MESG_MAXSIZE, f); + (void)fgets (buf, sizeof buf, f); nl = strchr (buf, '\n'); if (nl) { |