Commit 8d831e94 authored by Mukund Sivaraman's avatar Mukund Sivaraman
Browse files

[2512] Add some comments

parent 5b61be1e
......@@ -105,7 +105,13 @@ stringToCharStringData(const MasterToken::StringRegion& str_region,
int c = (*s & 0xff);
if (escape && std::isdigit(c) != 0) {
c = decimalToNumber(s, s_end);
// decimalToNumber() already throws if (s_end - s) is less
// than 3, so the following assertion is unnecessary. But we
// assert it anyway. 'n' is an unsigned type (size_t) and
// can underflow.
assert(n >= 3);
// 'n' and 's' are also updated by 1 in the for statement's
// expression, so we update them by 2 instead of 3 here.
n -= 2;
s += 2;
} else if (!escape && c == '\\') {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment