Unverified Commit 84d842ea authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

Merge pull request #4996 from dearblue/loadi16

Fix boundary check for `OP_LOADI16`; ref fa8668c7
parents 8cdf6a87 e2aecaca
......@@ -2448,7 +2448,7 @@ codegen(codegen_scope *s, node *tree, int val)
}
else if (i < 8) genop_1(s, OP_LOADI_0 + (uint8_t)i, cursp());
else if (i <= 0xff) genop_2(s, OP_LOADI, cursp(), (uint16_t)i);
else if (i <= 0xffff) genop_2S(s, OP_LOADI16, cursp(), (uint16_t)i);
else if (i <= 0x7fff) genop_2S(s, OP_LOADI16, cursp(), (uint16_t)i);
else {
int off;
......
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