Replace wcslen with math

This commit is contained in:
Fabian Homborg 2019-05-18 20:54:08 +02:00
parent 1e9d41f2c1
commit 3efa2ad93b

View File

@ -542,7 +542,7 @@ static expand_result_t expand_braces(const wcstring &instr, expand_flags_t flags
}
length_preceding_braces = (brace_begin - in);
length_following_braces = std::wcslen(brace_end) - 1;
length_following_braces = instr.size() - (brace_end - in) - 1;
tot_len = length_preceding_braces + length_following_braces;
item_begin = brace_begin + 1;
for (const wchar_t *pos = (brace_begin + 1); true; pos++) {