From 6ea9d52e76610e07ec1578cf8aad87721279f9bf Mon Sep 17 00:00:00 2001 From: Dudu Date: Sat, 15 Feb 2014 12:12:12 +0000 Subject: [PATCH] -- enable offsets larger than 2GB --- ext/mapped_file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/mapped_file.c b/ext/mapped_file.c index d835ab5..aade5be 100644 --- a/ext/mapped_file.c +++ b/ext/mapped_file.c @@ -116,8 +116,8 @@ static VALUE sm_mapped_file_close(VALUE vself) */ static VALUE sm_mapped_file_read_window_data(VALUE vself, VALUE voffset, VALUE vlength) { - size_t offset = NUM2INT(voffset); - size_t length = NUM2INT(vlength); + size_t offset = NUM2LONG(voffset); + size_t length = NUM2LONG(vlength); char buff[length]; VALUE vsm_map; simple_mmap_map *sm_map;