From b9c25de370ccb18716cf21e38009f42d54979ddc Mon Sep 17 00:00:00 2001 From: Paul Smith <psmith@gnu.org> Date: Sat, 28 Oct 2017 15:28:32 -0400 Subject: [PATCH] * function.c (func_if): Check the first character of condition. Reported by Rob W <robw9739@gmail.com> --- function.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/function.c b/function.c index c70c155e..edfacdf1 100644 --- a/function.c +++ b/function.c @@ -1245,7 +1245,7 @@ func_if (char *o, char **argv, const char *funcname UNUSED) { char *expansion = expand_argument (begp, endp+1); - result = strlen (expansion); + result = expansion[0] != '\0'; free (expansion); }