mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
fix the type of value that is returned by bit-shift expression.
This commit is contained in:
+4
-3
@@ -580,7 +580,8 @@ lambda_body(codegen_scope *s, node *tree, int blk)
|
||||
}
|
||||
tree = tree->cdr;
|
||||
if (tree->car) {
|
||||
int ma, oa, ra, pa, ka, kd, ba, a;
|
||||
int32_t a;
|
||||
int ma, oa, ra, pa, ka, kd, ba;
|
||||
int pos, i;
|
||||
node *n, *opt;
|
||||
|
||||
@@ -595,8 +596,8 @@ lambda_body(codegen_scope *s, node *tree, int blk)
|
||||
ka = kd = 0;
|
||||
ba = tree->car->cdr->cdr->cdr->cdr ? 1 : 0;
|
||||
|
||||
a = ((ma & 0x1f) << 18)
|
||||
| ((oa & 0x1f) << 13)
|
||||
a = ((int32_t)(ma & 0x1f) << 18)
|
||||
| ((int32_t)(oa & 0x1f) << 13)
|
||||
| ((ra & 1) << 12)
|
||||
| ((pa & 0x1f) << 7)
|
||||
| ((ka & 0x1f) << 2)
|
||||
|
||||
Reference in New Issue
Block a user