summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/emu/input.cpp4
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)