From 924826a817e397c89509963a1d13d951c9d51ce5 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 9 Feb 2017 20:25:59 -0500 Subject: bftw: Make the nameoff of "///" point to "/" This simplifies a few things such as -name handling for ///. --- printf.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'printf.c') diff --git a/printf.c b/printf.c index cad4dc0..0341288 100644 --- a/printf.c +++ b/printf.c @@ -145,6 +145,10 @@ static int bfs_printf_h(FILE *file, const struct bfs_printf_directive *directive buf = "."; } + if (!buf) { + return -1; + } + int ret = fprintf(file, directive->str, buf); free(copy); return ret; -- cgit v1.2.3