summaryrefslogtreecommitdiffhomepage
path: root/src/dump.c
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-06-05 08:34:09 +0900
committerYukihiro Matsumoto <[email protected]>2012-06-05 08:34:09 +0900
commitb7cc7fffe7030834c160ce2cb78c398ba23ac145 (patch)
tree4e66123607da386456a2d7c1d297f134b3d28e97 /src/dump.c
parent531124f0573e939d07d23ea0927483e0fb3954eb (diff)
downloadmruby-b7cc7fffe7030834c160ce2cb78c398ba23ac145.tar.gz
mruby-b7cc7fffe7030834c160ce2cb78c398ba23ac145.zip
symbol can contain non printable characters
Diffstat (limited to 'src/dump.c')
-rw-r--r--src/dump.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dump.c b/src/dump.c
index f3cbef3a0..7b2199a02 100644
--- a/src/dump.c
+++ b/src/dump.c
@@ -268,8 +268,10 @@ get_syms_block_size(mrb_state *mrb, mrb_irep *irep, int type)
size += DUMP_SIZE(MRB_DUMP_SIZE_OF_SHORT, type); /* snl(n) */
if (irep->syms[sym_no] != 0) {
- name = mrb_sym2name(mrb, irep->syms[sym_no]);
- nlen = str_dump_len((char*)name, strlen(name), type);
+ int len;
+
+ name = mrb_sym2name_len(mrb, irep->syms[sym_no], &len);
+ nlen = str_dump_len((char*)name, len, type);
size += nlen; /* sn(n) */
}
}