diff options
author | 2021-02-03 23:37:11 -0500 | |
---|---|---|
committer | 2021-02-03 23:37:15 -0500 | |
commit | 808dc240af219da9a9c7b7d7b30ad5a0bedba7bf (patch) | |
tree | 3d1a45d1d071d44ad5173001ffbb23e972b4d49c /src/emu/input.cpp | |
parent | a313f744cd619169d5425955ae5fd7de438ff23b (diff) |
input.cpp: Fix regression in token parsing
Diffstat (limited to 'src/emu/input.cpp')
-rw-r--r-- | src/emu/input.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/emu/input.cpp b/src/emu/input.cpp index 719cef8b45b..e22e443cc83 100644 --- a/src/emu/input.cpp +++ b/src/emu/input.cpp @@ -880,7 +880,7 @@ input_code input_manager::code_from_token(std::string_view _token) { // make a token up to the next underscore std::string_view::size_type score = _token.find('_'); - token[numtokens++].assign(_token, (std::string_view::npos == score) ? _token.length() : score); + token[numtokens++].assign(_token, 0, (std::string_view::npos == score) ? _token.length() : score); // if we hit the end, we're done, else advance our pointer if (std::string_view::npos == score) @@ -1331,7 +1331,7 @@ bool input_manager::map_device_to_controller(const devicemap_table_type *devicem { // make a token up to the next underscore std::string_view::size_type score = _token.find('_'); - token[numtokens++].assign(_token, (std::string_view::npos == score) ? _token.length() : score); + token[numtokens++].assign(_token, 0, (std::string_view::npos == score) ? _token.length() : score); // if we hit the end, we're done, else advance our pointer if (std::string_view::npos == score) |