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 59893e2116..4dcdeca693 100644
--- a/pack.c
+++ b/pack.c
@@ -691,11 +691,11 @@ pack_pack(VALUE ary, VALUE fmt)
case 'i': /* signed int */
case 'I': /* unsigned int */
while (len-- > 0) {
- long i;
+ int i;
from = NEXTFROM;
i = num2i32(from);
- rb_str_buf_cat(res, OFF32(&i), NATINT_LEN(int,4));
+ rb_str_buf_cat(res, (char*)&i, sizeof(int));
}
break;