From c39dc2e9b5d412d4d46375a5f97600d0e56fcf87 Mon Sep 17 00:00:00 2001
From: Nikias Bassen
Date: Thu, 7 Mar 2013 00:20:18 +0100
Subject: xml plists: make sure we don't produce  if it's empty
---
 src/xplist.c | 9 +++++++++
 1 file changed, 9 insertions(+)
(limited to 'src')
diff --git a/src/xplist.c b/src/xplist.c
index 6147265..ff7f2b8 100644
--- a/src/xplist.c
+++ b/src/xplist.c
@@ -266,6 +266,15 @@ static void node_to_xml(node_t* node, void *xml_struct)
     if (node_data->type == PLIST_ARRAY || node_data->type == PLIST_DICT)
         xmlNodeAddContent(child_node, BAD_CAST("\n"));
 
+    //make sure we don't produce  if it's empty
+    if ((node_data->type == PLIST_DATA) && !val) {
+        xmlNodeAddContent(child_node, BAD_CAST("\n"));
+        for (i = 0; i < xstruct->depth; i++)
+        {
+            xmlNodeAddContent(child_node, BAD_CAST("\t"));
+        }
+    }
+
     if (isStruct)
     {
         struct xml_node child = { child_node, xstruct->depth + 1 };
-- 
cgit v1.1-32-gdbae