From cc580f9b7aa8beed79591c5af2c93ee5b7a9a18e Mon Sep 17 00:00:00 2001 From: Allanis Date: Mon, 6 Jan 2014 20:08:18 +0000 Subject: [PATCH] [Fix] Clean up unidiffs when they fail to apply properly. --- dat/ship.xml | 8 ++++---- src/unidiff.c | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dat/ship.xml b/dat/ship.xml index 35d509e..cd669ab 100644 --- a/dat/ship.xml +++ b/dat/ship.xml @@ -26,17 +26,17 @@ 10 95 1000000 - 800 - 6000 + 80000 + 600000 Lancelot Fighter Bay - Lancelot Fighter + Lancelot Fighter Ripper MK2 Ragnarok Beam Orion Beam Headhunter Launcher - Headhunter + Headhunter diff --git a/src/unidiff.c b/src/unidiff.c index 1cbf7b4..47c1ecd 100644 --- a/src/unidiff.c +++ b/src/unidiff.c @@ -187,6 +187,10 @@ int diff_apply(char* name) { } } while(xml_nextNode(node)); + /* More clean up. */ + xmlFreeDoc(doc); + free(buf); + WARN("UniDiff '%s' not found in "DIFF_DATA".", name); return -1; }