From 808dc240af219da9a9c7b7d7b30ad5a0bedba7bf Mon Sep 17 00:00:00 2001 From: AJR Date: Wed, 3 Feb 2021 23:37:11 -0500 Subject: input.cpp: Fix regression in token parsing --- src/emu/input.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/emu/input.cpp') 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) -- cgit v1.2.3-70-g09d2