This commit is contained in:
Kyle Banker 2011-09-19 11:40:40 -04:00
parent e2fe70b022
commit e613880922
1 changed files with 1 additions and 1 deletions

View File

@ -904,7 +904,7 @@ static VALUE objectid_generate(int argc, VALUE* args, VALUE self)
if(argc == 0 || (argc == 1 && *args == Qnil)) {
t = htonl((int)time(NULL));
} else {
t = htonl(FIX2INT(rb_funcall(*args, rb_intern("to_i"), 0)));
t = htonl(NUM2UINT(rb_funcall(*args, rb_intern("to_i"), 0)));
}
MEMCPY(&oid_bytes, &t, unsigned char, 4);