mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 05:01:49 +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
|
||||
string countstr;
|
||||
string rest = split(argument, countstr, ' ');
|
||||
istringstream is(countstr);
|
||||
int count = 0;
|
||||
is >> count;
|
||||
//lyxerr << "repeat: count: " << count << " cmd: " << rest << endl;
|
||||
int const count = convert<int>(countstr);
|
||||
for (int i = 0; i < count; ++i)
|
||||
dispatch(lyxaction.lookupFunc(rest));
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user