summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2013-09-21 17:15:58 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2013-09-21 17:15:58 +0900
commit97ce25fbd0766a83780e036ff2709c0089cf213e (patch)
treea9c8589a01c02a80b84f110cff760bd7fab7cc6e
parentd74887f5822e3ec75f29fbb1de3ae6c9fe282513 (diff)
downloadmruby-97ce25fbd0766a83780e036ff2709c0089cf213e.tar.gz
mruby-97ce25fbd0766a83780e036ff2709c0089cf213e.zip
index to mrb_digitmap[] should always be positive
-rw-r--r--src/string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string.c b/src/string.c
index fa581f025..90852943e 100644
--- a/src/string.c
+++ b/src/string.c
@@ -1500,7 +1500,7 @@ mrb_ptr_to_str(mrb_state *mrb, void *p)
struct RString *p_str;
char *p1;
char *p2;
- intptr_t n = (intptr_t)p;
+ uintptr_t n = (uintptr_t)p;
p_str = str_new(mrb, NULL, 2 + sizeof(uintptr_t) * CHAR_BIT / 4);
p1 = p_str->ptr;