diff options
Diffstat (limited to 'FICS')
| -rw-r--r-- | FICS/utils.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/FICS/utils.c b/FICS/utils.c index 11445d6..1a1f408 100644 --- a/FICS/utils.c +++ b/FICS/utils.c @@ -487,6 +487,11 @@ psend_raw_file(int p, const char *dir, const char *file) char tmp[MAX_LINE_SIZE] = { '\0' }; int num; + if (file == NULL || strcmp(file, "") == 0) { + warnx("%s: no file", __func__); + return -1; + } + if (dir) (void) snprintf(fname, sizeof fname, "%s/%s", dir, file); else |
