mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-10 21:16:24 +02:00
If there are multiple escapes, pick the first.
This commit is contained in:
1 parent
91d4ded3fd
commit
4ed634383f
2 files changed
+6
-1
No files matched your search
@@ -348,6 +348,7 @@ std::string UnescapeMenuString(const char *input, char *shortcutChar) {
|
||||
std::string output;
|
||||
output.reserve(len);
|
||||
bool escaping = false;
|
||||
bool escapeFound = false;
|
||||
for (size_t i = 0; i < len; i++) {
|
||||
if (input[i] == '&') {
|
||||
if (escaping) {
|
||||
@@ -358,8 +359,9 @@ std::string UnescapeMenuString(const char *input, char *shortcutChar) {
|
||||
}
|
||||
} else {
|
||||
output.push_back(input[i]);
|
||||
if (escaping && shortcutChar) {
|
||||
if (escaping && shortcutChar && !escapeFound) {
|
||||
*shortcutChar = input[i];
|
||||
escapeFound = true;
|
||||
}
|
||||
escaping = false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user