mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Minor Style Tweak
This commit is contained in:
parent
c59a7279f0
commit
3d10ba3515
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue