vm.c: should cast bigint length to unsigned.

Otherwise length>127 would be considered as negative.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2022-07-28 15:21:32 +09:00
parent de2ea3c389
commit d0780c0525
+1 -1
View File
@@ -1357,7 +1357,7 @@ RETRY_TRY_BLOCK:
#ifdef MRB_USE_BIGINT
{
const char *s = pool[b].u.str;
regs[a] = mrb_bint_new_str(mrb, s+2, (mrb_int)s[0], (mrb_int)s[1]);
regs[a] = mrb_bint_new_str(mrb, s+2, (uint8_t)s[0], s[1]);
}
break;
#else