Skip to content

Commit

Permalink
Make minor style change(unescape_string())
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeno- committed Jan 16, 2015
1 parent e5b6367 commit 5481e38
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/util/string.h
Expand Up @@ -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];
}

Expand Down

0 comments on commit 5481e38

Please sign in to comment.