diff options
author | 2022-03-02 22:10:18 -0500 | |
---|---|---|
committer | 2022-03-02 22:10:18 -0500 | |
commit | 48a743d71b6c85ff43d4a1a297cffaf9dbdcd1e4 (patch) | |
tree | 3ad75654d33e48f3161c86829ea52b61eeaa1a57 /src/emu/input.cpp | |
parent | 37e1c2ab749c07d8dac7703bfd9bca8cb436a7c7 (diff) |
Fix out of bounds access to std::string_view (#9360)
In practice this was probably benign, because a trailing NUL was there. But this should still be fixed.
Diffstat (limited to 'src/emu/input.cpp')
-rw-r--r-- | src/emu/input.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/emu/input.cpp b/src/emu/input.cpp index bfd118c249f..169f76aabe3 100644 --- a/src/emu/input.cpp +++ b/src/emu/input.cpp @@ -860,7 +860,7 @@ std::string input_manager::code_to_token(input_code code) const std::string str(devclass); if (!devindex.empty()) str.append("_").append(devindex); - if (devcode[0] != 0) + if (!devcode.empty()) str.append("_").append(devcode); if (modifier != nullptr) str.append("_").append(modifier); |