diff options
Diffstat (limited to 'regerror.c')
-rw-r--r-- | regerror.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/regerror.c b/regerror.c index 59cf53068e..efcfefffdf 100644 --- a/regerror.c +++ b/regerror.c @@ -356,7 +356,8 @@ onig_vsnprintf_with_pattern(UChar buf[], int bufsize, OnigEncoding enc, *s++ = *p++; } else if (!ONIGENC_IS_CODE_PRINT(enc, *p) && - !ONIGENC_IS_CODE_SPACE(enc, *p)) { + (!ONIGENC_IS_CODE_SPACE(enc, *p) || + ONIGENC_IS_CODE_CNTRL(enc, *p))) { sprint_byte_with_x((char* )bs, (unsigned int )(*p++)); len = onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, bs); bp = bs; |