aboutsummaryrefslogtreecommitdiff
path: root/src/util/string.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/string.h')
-rw-r--r--src/util/string.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/util/string.h b/src/util/string.h
index fa298bfaa..3ece2371d 100644
--- a/src/util/string.h
+++ b/src/util/string.h
@@ -406,10 +406,11 @@ inline std::basic_string<T> unescape_string(std::basic_string<T> &s)
std::basic_string<T> res;
for (size_t i = 0; i < s.length(); i++) {
- if (s[i] == '\\')
+ if (s[i] == '\\') {
i++;
- if (i >= s.length())
- break;
+ if (i >= s.length())
+ break;
+ }
res += s[i];
}