Skip to content

Commit

Permalink
Use splitn with 2 to get correct split. (hopefully).
Browse files Browse the repository at this point in the history
  • Loading branch information
copyninja committed May 11, 2018
1 parent 123fa95 commit e559961
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/inputhelper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl InputHelper {
let got_nameplate = prefix.find('-').is_some();

if got_nameplate {
let ns: Vec<&str> = prefix.splitn(1, '-').collect();
let ns: Vec<&str> = prefix.splitn(2, '-').collect();
let nameplate = ns[0];
let words = ns.join("");

Expand Down

0 comments on commit e559961

Please sign in to comment.