Skip to content

Commit 384db4b

Browse files
committed
Stop assuming signed chars in DUMP_STRING(); that results in inconsistent output in platforms like ARM64 #34
1 parent 0d6a4ad commit 384db4b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ name: libvmod-cfg-8_0
1919
services:
2020
dev:
2121
hostname: dev
22+
# platform: linux/arm64/v8
2223
build:
2324
context: .
2425
privileged: true

src/variables.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ static const char *json_hex_chars = "0123456789abcdef";
129129
do { \
130130
DUMP_CHAR('"'); \
131131
for (int i = 0; value[i]; i++) { \
132-
if (value[i] > 31 && value[i] != '\"' && value[i] != '\\') { \
132+
if (value[i] > 31 && value[i] < 127 && value[i] != '\"' && value[i] != '\\') { \
133133
DUMP_CHAR(value[i]); \
134134
} else { \
135135
DUMP_CHAR('\\'); \

0 commit comments

Comments
 (0)