Skip to content

Commit e613880

Browse files
committed
1 parent e2fe70b commit e613880

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/cbson/cbson.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,7 @@ static VALUE objectid_generate(int argc, VALUE* args, VALUE self)
904904
if(argc == 0 || (argc == 1 && *args == Qnil)) {
905905
t = htonl((int)time(NULL));
906906
} else {
907-
t = htonl(FIX2INT(rb_funcall(*args, rb_intern("to_i"), 0)));
907+
t = htonl(NUM2UINT(rb_funcall(*args, rb_intern("to_i"), 0)));
908908
}
909909
MEMCPY(&oid_bytes, &t, unsigned char, 4);
910910

0 commit comments

Comments
 (0)