summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-07-09 08:40:46 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-07-09 08:40:46 +0000
commit3c1d5b89c33546028fce534546b8e356369ee231 (patch)
treefb658b101bf9a045c488663f2cbc6b3a178bbd3e /numeric.c
parent528b1f5237bc4e031228a27c00cdd679319f2472 (diff)
1.1b9_30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/numeric.c b/numeric.c
index 58c3eaab80..605fa6d0b9 100644
--- a/numeric.c
+++ b/numeric.c
@@ -789,7 +789,7 @@ fix2str(x, base)
else if (base == 8) fmt[2] = 'o';
else Fatal("fixnum cannot treat base %d", base);
- sprintf(buf, fmt, FIX2INT(x));
+ sprintf(buf, fmt, FIX2LONG(x));
return str_new2(buf);
}
@@ -1099,7 +1099,7 @@ fix_lshift(x, y)
val = NUM2LONG(x);
width = NUM2LONG(y);
if (width > (sizeof(VALUE)*CHAR_BIT-1)
- || (unsigned)val>>(sizeof(VALUE)*CHAR_BIT-1-width) > 0) {
+ || (unsigned long)val>>(sizeof(VALUE)*CHAR_BIT-1-width) > 0) {
return big_lshift(int2big(val), y);
}
val = val << width;