Validate user text object desc more thorougly

Fixes #992
Fixes #993
Fixes #994
This commit is contained in:
Maxime Coste 2016-12-15 09:27:02 +00:00
parent 430ff37bd6
commit 9ad1c19f69
4 changed files with 4 additions and 1 deletions

View File

@ -1011,7 +1011,7 @@ void select_object(Context& context, NormalParams params)
return;
Vector<String> params = split(cmdline, ',', '\\');
if (params.size() != 2)
if (params.size() != 2 or params[0].empty() or params[1].empty())
throw runtime_error{"desc parsing failed, expected <open>,<close>"};
select_and_set_last<mode>(

View File

@ -0,0 +1 @@
<a-a>:,,<ret>

View File

@ -0,0 +1 @@

View File

@ -0,0 +1 @@