mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fixed IndexOutOfRangeException for GetVdfValue
This commit is contained in:
@ -305,14 +305,15 @@ namespace Wabbajack.Common.StoreHandlers
|
|||||||
private static string GetVdfValue(string line)
|
private static string GetVdfValue(string line)
|
||||||
{
|
{
|
||||||
var trim = line.Trim('\t').Replace("\t", "");
|
var trim = line.Trim('\t').Replace("\t", "");
|
||||||
string[] s = trim.Split('\"');
|
var split = trim.Split('\"');
|
||||||
return s[3].Replace("\\\\", "\\");
|
return split.Length >= 4 ? split[3].Replace("\\\\", "\\") : string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GetSingleVdfValue(string line)
|
private static string GetSingleVdfValue(string line)
|
||||||
{
|
{
|
||||||
var trim = line.Trim('\t').Replace("\t", "");
|
var trim = line.Trim('\t').Replace("\t", "");
|
||||||
return trim.Split('\"')[1];
|
var split = trim.Split('\"');
|
||||||
|
return split.Length >= 2 ? split[1] : string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user