diff --git a/src/common/impl/commandoption.c b/src/common/impl/commandoption.c index d32c0fe08..e855b0ae7 100644 --- a/src/common/impl/commandoption.c +++ b/src/common/impl/commandoption.c @@ -178,7 +178,7 @@ static bool parseStructureCommand( } } - if (fn == genJsonResult) { + if (data->resultDoc) { yyjson_mut_doc* doc = data->resultDoc; yyjson_mut_val* module = yyjson_mut_arr_add_obj(doc, doc->root); yyjson_mut_obj_add_str(doc, module, "type", line);