summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string.c b/src/string.c
index ac79f7c58..dee383fab 100644
--- a/src/string.c
+++ b/src/string.c
@@ -2997,7 +2997,7 @@ mrb_str_bytes(mrb_state *mrb, mrb_value str)
{
struct RString *s = mrb_str_ptr(str);
mrb_value a = mrb_ary_new_capa(mrb, s->len);
- char *p = s->ptr, *pend = p + s->len;
+ unsigned char *p = (unsigned char *)(s->ptr), *pend = p + s->len;
while (p < pend) {
mrb_ary_push(mrb, a, mrb_fixnum_value(p[0]));