mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-10-31 19:48:53 +00:00
@@ -121,7 +121,7 @@ static IPSwitchRecord EscapeStringSequences(std::string_view sv) {
|
|||||||
IPSwitchRecord r{};
|
IPSwitchRecord r{};
|
||||||
for (auto it = sv.cbegin(); it < sv.cend(); ) {
|
for (auto it = sv.cbegin(); it < sv.cend(); ) {
|
||||||
if (*it == '\\' && it + 1 < sv.cend()) {
|
if (*it == '\\' && it + 1 < sv.cend()) {
|
||||||
auto const escape_char = [it]() {
|
r.data.push_back([it]() {
|
||||||
switch (it[1]) {
|
switch (it[1]) {
|
||||||
case 'a': return '\a';
|
case 'a': return '\a';
|
||||||
case 'b': return '\b';
|
case 'b': return '\b';
|
||||||
@@ -134,11 +134,10 @@ static IPSwitchRecord EscapeStringSequences(std::string_view sv) {
|
|||||||
case '?': return '\?';
|
case '?': return '\?';
|
||||||
default: return it[1];
|
default: return it[1];
|
||||||
}
|
}
|
||||||
}();
|
}());
|
||||||
r.data.push_back(escape_char);
|
|
||||||
it += 2;
|
it += 2;
|
||||||
} else {
|
} else {
|
||||||
r.data.push_back(it);
|
r.data.push_back(*it);
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user