codegen.c: generate `OP_HASH` in `gen_hash()` if `limit` exceeds.

That means when `limit` is `0` it should always generate a hash.
parent 6f5e74f5
......@@ -1643,6 +1643,12 @@ gen_hash(codegen_scope *s, node *tree, int val, int limit)
len = 0;
}
}
if (val && len > limit) {
pop_n(len*2);
genop_2(s, OP_HASH, cursp(), len);
push();
return -1;
}
if (update) {
if (val && len > 0) {
pop_n(len*2+1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment