mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-12 16:50:39 +00:00
preamble.cpp revert crash prone code
a real fix is on the list and will hopefully be comitted tomorrow. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@22043 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
ee6400b2ad
commit
003c6aa0f8
@ -120,19 +120,14 @@ void handle_opt(vector<string> & opts, char const * const * what, string & targe
|
||||
if (opts.empty())
|
||||
return;
|
||||
|
||||
// the last language option is the document language (for babel and LyX)
|
||||
// the last size option is the document font size
|
||||
vector<string>::iterator it;
|
||||
vector<string>::iterator position = opts.begin();
|
||||
for (; *what; ++what) {
|
||||
it = find(opts.begin(), opts.end(), *what);
|
||||
if (it != opts.end()) {
|
||||
if (it >= position) {
|
||||
target = *what;
|
||||
position = it;
|
||||
}
|
||||
target = *what;
|
||||
// remove found options from the list
|
||||
opts.erase(it);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user