diff options
Diffstat (limited to 'tests/zlib/trees.c')
-rw-r--r-- | tests/zlib/trees.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/zlib/trees.c b/tests/zlib/trees.c index 56e9bb1c..18be5013 100644 --- a/tests/zlib/trees.c +++ b/tests/zlib/trees.c @@ -722,7 +722,11 @@ local void scan_tree (s, tree, max_code) int min_count = 4; /* min repeat count */ if (nextlen == 0) max_count = 138, min_count = 3; +#ifndef EMSCRIPTEN_OPTS tree[max_code+1].Len = (ush)0xffff; /* guard */ +#else + tree[max_code+1].Len = (ush)0x7fff; /* guard. Emscripten: Prevents llvm_gcc from creating '-1' which needs unsigning later */ +#endif for (n = 0; n <= max_code; n++) { curlen = nextlen; nextlen = tree[n+1].Len; |