mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
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:
parent
7fb25526d5
commit
12f83da64f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user