Fix crash when imgtool is given only one filename.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5607 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2020-01-20 18:39:40 +00:00
parent 1c2026c055
commit 20ad7f3f33

View file

@ -1736,7 +1736,7 @@ showhelp:
ImgTool_Convert(&args, ImgTool_Combine(&args, argv, files), "combined", argv[files]);
}
else if (mode == mode_convert && files == 1 && args.textype<0) //overwrite input
ImgTool_Convert(&args, ImgTool_Read(&args, argv[u]), argv[u], argv[u]);
ImgTool_Convert(&args, ImgTool_Read(&args, argv[0]), argv[0], NULL);
else if (mode == mode_convert && !(files&1) && args.textype<0) //list of pairs
{
//-c src1 dst1 src2 dst2