Skip to content

Commit

Permalink
Stop assuming signed chars in DUMP_STRING(); that results in inconsis…
Browse files Browse the repository at this point in the history
…tent output in platforms like ARM64 #34
  • Loading branch information
carlosabalde committed May 29, 2024
1 parent 118b94e commit 70e8448
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ name: libvmod-cfg-master
services:
dev:
hostname: dev
# platform: linux/arm64/v8
build:
context: .
no_cache: true
Expand Down
2 changes: 1 addition & 1 deletion src/variables.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static const char *json_hex_chars = "0123456789abcdef";
do { \
DUMP_CHAR('"'); \
for (int i = 0; value[i]; i++) { \
if (value[i] > 31 && value[i] != '\"' && value[i] != '\\') { \
if (value[i] > 31 && value[i] < 127 && value[i] != '\"' && value[i] != '\\') { \
DUMP_CHAR(value[i]); \
} else { \
DUMP_CHAR('\\'); \
Expand Down

0 comments on commit 70e8448

Please sign in to comment.