summaryrefslogtreecommitdiffhomepage
path: root/src/codedump.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-11-30 23:19:59 +0900
committerGitHub <[email protected]>2020-11-30 23:19:59 +0900
commitd56db2296d30e4c8cb69b76258dbca5d8fbafeb8 (patch)
tree625488603ac785495e9fd8bc62fba0c52da99d79 /src/codedump.c
parent9f5c0777f17fe8caff89cef75f2056262e708349 (diff)
parent0ecb0fd97be3a8f9a7a092d5949a390957b5df0c (diff)
downloadmruby-d56db2296d30e4c8cb69b76258dbca5d8fbafeb8.tar.gz
mruby-d56db2296d30e4c8cb69b76258dbca5d8fbafeb8.zip
Merge pull request #5205 from dearblue/codedump
Fixed print catch handler address in codedump; ref #5200
Diffstat (limited to 'src/codedump.c')
-rw-r--r--src/codedump.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/codedump.c b/src/codedump.c
index 94d4f24c0..bc882b890 100644
--- a/src/codedump.c
+++ b/src/codedump.c
@@ -86,9 +86,9 @@ codedump(mrb_state *mrb, const mrb_irep *irep)
const struct mrb_irep_catch_handler *e = mrb_irep_catch_handler_table(irep);
for (; i > 0; i --, e ++) {
- int begin = bin_to_uint16(e->begin);
- int end = bin_to_uint16(e->end);
- int target = bin_to_uint16(e->target);
+ uint32_t begin = mrb_irep_catch_handler_unpack(e->begin);
+ uint32_t end = mrb_irep_catch_handler_unpack(e->end);
+ uint32_t target = mrb_irep_catch_handler_unpack(e->target);
char buf[20];
const char *type;
@@ -105,7 +105,7 @@ codedump(mrb_state *mrb, const mrb_irep *irep)
type = buf;
break;
}
- printf("catch type: %-8s begin: %04d end: %04d target: %04d\n", type, begin, end, target);
+ printf("catch type: %-8s begin: %04" PRIu32 " end: %04" PRIu32 " target: %04" PRIu32 "\n", type, begin, end, target);
}
}