]> wimlib.net Git - wimlib/blobdiff - src/xml.c
xml_print_image_info(): handle LANGUAGE element with no text
[wimlib] / 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) {
-                       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'));