diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-07-06 15:34:04 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-07-06 15:34:04 +0000 |
commit | 7ee6680318455e8309d1f87bc4bfa6cdbcbc4050 (patch) | |
tree | 27da081b3004c6e208745bd6b09a459ff4566c4b /time.c | |
parent | aa2a96eb5bb64cecc1d540050009de5802ffbea4 (diff) |
* time.c (time_mload): a patch from Daniel Berger
<Daniel.Berger at qwest.com>. [ruby-core:08128]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r-- | time.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1900,7 +1900,7 @@ time_mdump(time) if ((tm->tm_year & 0xffff) != tm->tm_year) rb_raise(rb_eArgError, "year too big to marshal"); - p = 0x1 << 31 | /* 1 */ + p = 0x1UL << 31 | /* 1 */ tm->tm_year << 14 | /* 16 */ tm->tm_mon << 10 | /* 4 */ tm->tm_mday << 5 | /* 5 */ @@ -1976,12 +1976,12 @@ time_mload(time, str) s |= buf[i]<<(8*(i-4)); } - if ((p & (1<<31)) == 0) { + if ((p & (1UL<<31)) == 0) { sec = p; usec = s; } else { - p &= ~(1<<31); + p &= ~(1UL<<31); tm.tm_year = (p >> 14) & 0xffff; tm.tm_mon = (p >> 10) & 0xf; tm.tm_mday = (p >> 5) & 0x1f; |