summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io.c b/io.c
index 21d6d12c9c..8838bba7e0 100644
--- a/io.c
+++ b/io.c
@@ -7456,7 +7456,7 @@ rb_io_ctl(VALUE io, VALUE req, VALUE arg, int io_p)
rb_str_resize(arg, len+1);
}
RSTRING_PTR(arg)[len] = 17; /* a little sanity check here */
- narg = (long)RSTRING_PTR(arg);
+ narg = (long)(SIGNED_VALUE)RSTRING_PTR(arg);
}
}
GetOpenFile(io, fptr);