diff options
author | Phil Jones <philj56@gmail.com> | 2022-06-21 12:22:06 +0100 |
---|---|---|
committer | Phil Jones <philj56@gmail.com> | 2022-06-21 12:22:06 +0100 |
commit | 54e90f75203bbf40ec6ac6dd09227e2c6f97cc62 (patch) | |
tree | 1f6074e47a2e0477b697bbcec2c52128bd652657 /src/history.c | |
parent | c0cd4cdf78886040528b16fad084a14165a16384 (diff) |
Add various command line arguments.
There are too many really to use single-character args, so the next step
should be a config file.
Diffstat (limited to 'src/history.c')
-rw-r--r-- | src/history.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/history.c b/src/history.c index 89a45d3..94d3f75 100644 --- a/src/history.c +++ b/src/history.c @@ -79,7 +79,11 @@ struct history history_load() } char *buf = xmalloc(len); - fread(buf, 1, len, histfile); + if (fread(buf, 1, len, histfile) != 0) { + log_error("Error reading history file: %s.\n", strerror(errno)); + fclose(histfile); + return vec; + } fclose(histfile); char *saveptr = NULL; |