]> wimlib.net Git - wimlib/commitdiff
xml_print_image_info(): handle LANGUAGE element with no text
authorEric Biggers <ebiggers3@gmail.com>
Mon, 19 Oct 2015 00:39:29 +0000 (19:39 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Mon, 19 Oct 2015 00:48:25 +0000 (19:48 -0500)
src/xml.c

index d13944a76ebd8c03492b791bb7c3c2a179a4c259..a6dab415e891fdf996769bc0ec26f7e6e48207bb 100644 (file)
--- 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) {
 
                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'));
 
                }
                tputchar(T('\n'));