mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 10:58:52 +00:00
Use convert instead of a stream to read LFUN_REPEAT count
At least coverity should find it safer.
This commit is contained in:
parent
f58d7dfe7b
commit
5c03cb340c
@ -1857,10 +1857,7 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
// repeat command
|
// repeat command
|
||||||
string countstr;
|
string countstr;
|
||||||
string rest = split(argument, countstr, ' ');
|
string rest = split(argument, countstr, ' ');
|
||||||
istringstream is(countstr);
|
int const count = convert<int>(countstr);
|
||||||
int count = 0;
|
|
||||||
is >> count;
|
|
||||||
//lyxerr << "repeat: count: " << count << " cmd: " << rest << endl;
|
|
||||||
for (int i = 0; i < count; ++i)
|
for (int i = 0; i < count; ++i)
|
||||||
dispatch(lyxaction.lookupFunc(rest));
|
dispatch(lyxaction.lookupFunc(rest));
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user