mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
bigint.c: fix signed/unsigned comparison warning in base conversion
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -4035,7 +4035,7 @@ mpz_get_str(mpz_ctx_t *ctx, char *s, mrb_int sz, mrb_int base, mpz_t *x)
|
||||
}
|
||||
|
||||
// convert to character
|
||||
for (mp_limb b=b2; b>=base; b/=(mp_limb)base) {
|
||||
for (mp_limb b=b2; b>=(mp_limb)base; b/=(mp_limb)base) {
|
||||
char a0 = (char)(a % base);
|
||||
if (a0 < 10) a0 += '0';
|
||||
else a0 += 'a' - 10;
|
||||
|
||||
Reference in New Issue
Block a user