From afd6c6c9ff254740b5ef8649b7e4d6893f7300ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cornelius=20K=C3=B6pp?= Date: Wed, 24 Apr 2024 23:48:32 +0200 Subject: [PATCH] Fix/Draft: Do Not Try to Parse Empty ReplacesVersions --- TemplateApplication.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/TemplateApplication.cs b/TemplateApplication.cs index d5a15c0..5510f94 100644 --- a/TemplateApplication.cs +++ b/TemplateApplication.cs @@ -108,10 +108,13 @@ private static StringDict GetEtsParams(XmlNode iEtsNode) } else if (lAttribute.Name == "ReplacesVersions") { - string[] lVersions = lValue.Split(' '); - for (int lPos = 0; lPos < lVersions.Length; lPos++) - lVersions[lPos] = ParseNumberValue("ReplacesVersions", lVersions[lPos]).ToString(); - lValue = string.Join(' ', lVersions); + if (lValue != "") + { + string[] lVersions = lValue.Split(' '); + for (int lPos = 0; lPos < lVersions.Length; lPos++) + lVersions[lPos] = ParseNumberValue("ReplacesVersions", lVersions[lPos]).ToString(); + lValue = string.Join(' ', lVersions); + } } // TODO: we have to check, if these values should also go to config (additional replacement option)? lResult[lConfigName] = lValue;