summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/mruby/dump.h1
-rw-r--r--src/dump.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/include/mruby/dump.h b/include/mruby/dump.h
index 0826606e9..cad797275 100644
--- a/include/mruby/dump.h
+++ b/include/mruby/dump.h
@@ -41,6 +41,7 @@ int mrb_bdump_irep(mrb_state *mrb, int n, FILE *f,const char *initname);
#define MRB_DUMP_SIZE_OF_LONG 4
#define MRB_DUMP_SIZE_OF_INT 4
#define MRB_DUMP_SIZE_OF_SHORT 2
+#define MRB_DUMP_SIZE_OF_CHAR 1
/* null symbol length */
#define MRB_DUMP_NULL_SYM_LEN 0xFFFF
diff --git a/src/dump.c b/src/dump.c
index c8f92ec72..e7e1a4807 100644
--- a/src/dump.c
+++ b/src/dump.c
@@ -84,7 +84,7 @@ uint8_dump(unsigned char bin, char *hex, int type)
*hex++ = bin2hex[(bin >> 4) & 0x0f];
*hex = bin2hex[bin & 0x0f];
}
- return DUMP_SIZE(sizeof(char), type);
+ return DUMP_SIZE(MRB_DUMP_SIZE_OF_CHAR, type);
}
static inline int