From 5277f18435ae7297f4f6cbec86193240a06227a7 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sun, 18 Oct 2015 19:39:29 -0500 Subject: [PATCH] xml_print_image_info(): handle LANGUAGE element with no text --- src/xml.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/xml.c b/src/xml.c index d13944a7..a6dab415 100644 --- a/src/xml.c +++ b/src/xml.c @@ -920,11 +920,12 @@ print_windows_info(struct wim_xml_info *info, xmlNode *image_node) tprintf(T("Languages: ")); node_for_each_child(langs_node, lang_node) { - if (node_is_element(lang_node, "LANGUAGE")) { - tfputs(node_get_ttext(info, lang_node), stdout); - tputchar(T(' ')); - } - + if (!node_is_element(lang_node, "LANGUAGE")) + continue; + text = node_get_ttext(info, lang_node); + if (!text) + continue; + tprintf(T("%"TS" "), text); } tputchar(T('\n')); -- 2.43.0