diff options
Diffstat (limited to 'pack.c')
-rw-r--r-- | pack.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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"); } |