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:
parent
b58ef4f3e7
commit
a3c8fb4c17
@ -305,14 +305,15 @@ namespace Wabbajack.Common.StoreHandlers
|
||||
private static string GetVdfValue(string line)
|
||||
{
|
||||
var trim = line.Trim('\t').Replace("\t", "");
|
||||
string[] s = trim.Split('\"');
|
||||
return s[3].Replace("\\\\", "\\");
|
||||
var split = trim.Split('\"');
|
||||
return split.Length >= 4 ? split[3].Replace("\\\\", "\\") : string.Empty;
|
||||
}
|
||||
|
||||
private static string GetSingleVdfValue(string line)
|
||||
{
|
||||
var trim = line.Trim('\t').Replace("\t", "");
|
||||
return trim.Split('\"')[1];
|
||||
var split = trim.Split('\"');
|
||||
return split.Length >= 2 ? split[1] : string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user