summaryrefslogtreecommitdiff
path: root/pcretest.c
diff options
context:
space:
mode:
Diffstat (limited to 'pcretest.c')
-rw-r--r--pcretest.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pcretest.c b/pcretest.c
index 5748c55..5b73a91 100644
--- a/pcretest.c
+++ b/pcretest.c
@@ -1982,6 +1982,7 @@ return(result);
static int pchar(pcre_uint32 c, FILE *f)
{
int n = 0;
+char tempbuffer[16];
if (PRINTOK(c))
{
if (f != NULL) fprintf(f, "%c", c);
@@ -2003,6 +2004,8 @@ if (c < 0x100)
}
if (f != NULL) n = fprintf(f, "\\x{%02x}", c);
+ else n = sprintf(tempbuffer, "\\x{%02x}", c);
+
return n >= 0 ? n : 0;
}