diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-05-07 16:22:29 +0100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-05-07 16:25:34 +0100 |
| commit | 3a3144f3f5c822d8931baf2a94bb75cfe4024a18 (patch) | |
| tree | 0266568c095f6489270601c0eb8871dbc56796d8 /src/command_manager.cc | |
| parent | c5824fc5066c74961f001ddff5ffb34f14c4d1f5 (diff) | |
Fix use of invalidated iterator in the command map on exception
The command map can get mutated by command execution, so the iterators
can get invalidated (now that we use our curstom HashMap implementation,
all iterators are potentially invalidated by insert/removal)
Diffstat (limited to 'src/command_manager.cc')
| -rw-r--r-- | src/command_manager.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/command_manager.cc b/src/command_manager.cc index 48b08c5f..edecb9c4 100644 --- a/src/command_manager.cc +++ b/src/command_manager.cc @@ -456,7 +456,7 @@ void CommandManager::execute_single_command(CommandParameters params, catch (runtime_error& error) { throw runtime_error(format("{}:{}: '{}' {}", pos.line+1, pos.column+1, - command_it->key, error.what())); + params[0], error.what())); } } |
