aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
Diffstat (limited to 'FICS')
-rw-r--r--FICS/utils.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/FICS/utils.c b/FICS/utils.c
index 7cbb608..e0a68fa 100644
--- a/FICS/utils.c
+++ b/FICS/utils.c
@@ -532,6 +532,11 @@ psend_file(int p, const char *dir, const char *file)
parray[p].last_file = NULL;
parray[p].last_file_byte = 0L;
+ if (file == NULL || strcmp(file, "") == 0) {
+ warnx("%s: error: no file", __func__);
+ return -1;
+ }
+
if (dir)
snprintf(fname, sizeof fname, "%s/%s", dir, file);
else