Minor Style Tweak

This commit is contained in:
Dev Bali 2019-07-29 14:50:57 -07:00
parent c59a7279f0
commit 3d10ba3515

View file

@ -274,12 +274,12 @@ pair<const char*, size_t> ODesc::FirstEscapeLoc(const char* bytes, size_t n)
if ( len ) if ( len )
return escape_pos(bytes + i, len); return escape_pos(bytes + i, len);
if (!isprint(bytes[i])) if ( !isprint(bytes[i]) )
{ {
if (utf8) if (utf8)
{ {
size_t utf_found = getNumBytesForUTF8(bytes[i]); size_t utf_found = getNumBytesForUTF8(bytes[i]);
if (utf_found > 1 && utf_found < (n-i+1) && isLegalUTF8Sequence(reinterpret_cast<const unsigned char *>(bytes+i), reinterpret_cast<const unsigned char *>(bytes+i+utf_found) )) if ( utf_found > 1 && utf_found < (n-i+1) && isLegalUTF8Sequence(reinterpret_cast<const unsigned char *>(bytes+i), reinterpret_cast<const unsigned char *>(bytes+i+utf_found)) )
{ {
i += utf_found - 1; i += utf_found - 1;
continue; continue;