fixed crash on invalid input followed by -i for texture packer command.
This commit is contained in:
parent
442ec92d32
commit
74a9ff74b2
@ -64,12 +64,17 @@ namespace RecrownedAthenaeum.Tools.TextureAtlasTools
|
||||
if (input == "q") return;
|
||||
if (input.Length == 0) break;
|
||||
} while (!int.TryParse(input, out mp));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
int indexOfInputArg = IndexOfArgumentIn("-i", arguments);
|
||||
if (indexOfInputArg + 1 >= arguments.Length) throw new ArgumentException("-i is not followed by input path.");
|
||||
path = arguments[1 + IndexOfArgumentIn("-i", arguments)];
|
||||
int.TryParse(arguments[IndexOfArgumentIn("-mp", arguments) + 1], out mp);
|
||||
int.TryParse(arguments[IndexOfArgumentIn("-sp", arguments) + 1], out sp);
|
||||
int indexOfOutputArg = IndexOfArgumentIn("-o", arguments);
|
||||
if (indexOfOutputArg + 1 >= arguments.Length) throw new ArgumentException("-o is not followed by input path.");
|
||||
output = arguments[IndexOfArgumentIn("-o", arguments) + 1];
|
||||
if (HasArgument("-dau", arguments)) dau = true;
|
||||
}
|
||||
|
@ -89,7 +89,6 @@
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\RecrownedAthenaeum.Pipeline\RecrownedAthenaeum.Pipeline.csproj">
|
||||
<Project>{b38f9812-b1d1-4bfe-89ee-fc4dd4ebaa3f}</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user