aboutsummaryrefslogtreecommitdiffstats
path: root/src/custom.c
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2009-07-29 18:20:54 +0000
committerFrederic Culot <calcurse@culot.org>2009-07-29 18:20:54 +0000
commit35e4aa61c777b45bbfcd819fee09e25d1c1b1faf (patch)
treeb778537e742e03157008aeda945d60a8e08dbc94 /src/custom.c
parent3509b7bb723c5b6fcf64f0b933b4b223e96728ef (diff)
downloadcalcurse-35e4aa61c777b45bbfcd819fee09e25d1c1b1faf.tar.gz
calcurse-35e4aa61c777b45bbfcd819fee09e25d1c1b1faf.zip
bugfixes
Diffstat (limited to 'src/custom.c')
-rwxr-xr-xsrc/custom.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/custom.c b/src/custom.c
index c68f0bb..679d914 100755
--- a/src/custom.c
+++ b/src/custom.c
@@ -1,4 +1,4 @@
-/* $calcurse: custom.c,v 1.41 2009/07/12 17:55:13 culot Exp $ */
+/* $calcurse: custom.c,v 1.42 2009/07/29 18:20:54 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -222,7 +222,7 @@ custom_load_conf (conf_t *conf, int background)
FILE *data_file;
char *mesg_line1 = _("Failed to open config file");
char *mesg_line2 = _("Press [ENTER] to continue");
- char buf[100], e_conf[100];
+ char buf[BUFSIZ], e_conf[BUFSIZ];
int var;
data_file = fopen (path_conf, "r");
@@ -237,11 +237,11 @@ custom_load_conf (conf_t *conf, int background)
pthread_mutex_lock (&nbar.mutex);
for (;;)
{
- if (fgets (buf, 99, data_file) == NULL)
+ if (fgets (buf, sizeof buf, data_file) == NULL)
{
break;
}
- io_extract_data (e_conf, buf, strlen (buf));
+ io_extract_data (e_conf, buf, sizeof buf);
switch (var)
{