Avoid an infinite loop when using the -geometry option on *nix

* src/lyx_main.C
	(easyParse): decrement the loop variable only when remove > 0


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16107 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2006-11-29 19:44:13 +00:00
parent 7fb25526d5
commit 12f83da64f

View File

@ -1328,10 +1328,12 @@ void LyX::easyParse(int & argc, char * argv[])
// Now, remove used arguments by shifting
// the following ones remove places down.
argc -= remove;
for (int j = i; j < argc; ++j)
argv[j] = argv[j + remove];
--i;
if (remove > 0) {
argc -= remove;
for (int j = i; j < argc; ++j)
argv[j] = argv[j + remove];
--i;
}
}
batch_command = batch;