diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-01-02 13:22:55 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-01-02 20:28:28 +0900 |
| commit | b151a697e09b2088db3d1f86f355f32fb60f9691 (patch) | |
| tree | ff474ea5c0b0b3d1dfd26a6b03a22ba7edd19248 /src/codedump.c | |
| parent | c1f05a7fb3e15acbe8bce0789af505a2b6a5876a (diff) | |
| download | mruby-b151a697e09b2088db3d1f86f355f32fb60f9691.tar.gz mruby-b151a697e09b2088db3d1f86f355f32fb60f9691.zip | |
Fixed wrong casting in `OP_LOADI32`.
Negative integer `>-65535` had wrong value, e,g, `p(-40550)` printed
`4294926746` since Nov. 2020, sigh.
Diffstat (limited to 'src/codedump.c')
| -rw-r--r-- | src/codedump.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codedump.c b/src/codedump.c index 576ff6ceb..b005c1173 100644 --- a/src/codedump.c +++ b/src/codedump.c @@ -172,7 +172,7 @@ codedump(mrb_state *mrb, const mrb_irep *irep) print_lv_a(mrb, irep, a); break; CASE(OP_LOADI32, BSS); - printf("OP_LOADI32\tR%d\t%d\t", a, (int)(((uint32_t)b<<16)+c)); + printf("OP_LOADI32\tR%d\t%d\t", a, (int32_t)(((uint32_t)b<<16)+c)); print_lv_a(mrb, irep, a); break; CASE(OP_LOADI__1, B); |
