Skip to content

Commit

Permalink
Fix for unkown DLC's
Browse files Browse the repository at this point in the history
  • Loading branch information
indilo53 committed Jul 17, 2019
1 parent e19fdc2 commit 63b2c96
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 12 additions & 2 deletions gtautil/Program/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ public static string[] GetDLCList()
var matchMinOrder = minOrderRegex.Match(xml);
var matchPath = pathRegex.Match(fullFileName);
var matchPath2 = pathRegex2.Match(fullFileName);
var dlcName = matchPath.Success ? matchPath.Groups[1].Value : matchPath2.Groups[1].Value;
dlcOrders[dlcName] = new Tuple<int, int>(matchOrder.Success ? int.Parse(matchOrder.Groups[1].Value) : 0, matchMinOrder.Success ? int.Parse(matchMinOrder.Groups[1].Value) : 0);
Expand All @@ -298,8 +299,17 @@ public static string[] GetDLCList()
{
foreach (XmlNode itemnode in pathsnode.ChildNodes)
{
string[] path = itemnode.InnerText.ToLowerInvariant().Split('/');
dlclist.Add(path[path.Length - 2]);
string p = itemnode.InnerText.ToLowerInvariant();
string[] path = p.Split('/');

if(path.Length - 2 < 0)
{
Console.Error.WriteLine("Ignoring " + p);
}
else
{
dlclist.Add(path[path.Length - 2]);
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion gtautil/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
// en utilisant '*', comme indiqué ci-dessous :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.2.6.0")]
[assembly: AssemblyVersion("2.2.7.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

0 comments on commit 63b2c96

Please sign in to comment.