summaryrefslogtreecommitdiff
path: root/pack.c
diff options
context:
space:
mode:
Diffstat (limited to 'pack.c')
-rw-r--r--pack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pack.c b/pack.c
index f9a907196f..0df3c567ed 100644
--- a/pack.c
+++ b/pack.c
@@ -861,13 +861,13 @@ pack_pack(VALUE ary, VALUE fmt)
case 'U': /* Unicode character */
while (len-- > 0) {
- long l;
+ SIGNED_VALUE l;
char buf[8];
int le;
from = NEXTFROM;
from = rb_to_int(from);
- l = NUM2INT(from);
+ l = NUM2LONG(from);
if (l < 0) {
rb_raise(rb_eRangeError, "pack(U): value out of range");
}