From: Nicolas Williams Date: Tue, 18 Jun 2013 03:32:44 +0000 (-0500) Subject: Fix serious bug in handling of --argfile X-Git-Tag: jq-1.4~96^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=refs%2Fpull%2F157%2Fhead;p=jq Fix serious bug in handling of --argfile --- diff --git a/main.c b/main.c index e7e4e09..3f82b46 100644 --- a/main.c +++ b/main.c @@ -202,7 +202,7 @@ int main(int argc, char* argv[]) { jv_free(data); return 1; } - if (jv_array_length(data) == 1) + if (jv_get_kind(data) == JV_KIND_ARRAY && jv_array_length(jv_copy(data)) == 1) data = jv_array_get(data, 0); arg = jv_object_set(arg, jv_string("value"), data); program_arguments = jv_array_append(program_arguments, arg);