summaryrefslogtreecommitdiff
path: root/pack.c
diff options
context:
space:
mode:
Diffstat (limited to 'pack.c')
-rw-r--r--pack.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/pack.c b/pack.c
index d77ed999b4..f4c907cc2e 100644
--- a/pack.c
+++ b/pack.c
@@ -1014,7 +1014,6 @@ pack_pack(VALUE ary, VALUE fmt)
VALUE buf = rb_str_new(0, 0);
size_t numbytes;
int sign;
- size_t count;
char *cp;
from = NEXTFROM;
@@ -1024,8 +1023,7 @@ pack_pack(VALUE ary, VALUE fmt)
numbytes = 1;
buf = rb_str_new(NULL, numbytes);
- count = RSTRING_LEN(buf);
- rb_int_export(from, &sign, RSTRING_PTR(buf), &count, 1, 1, 1, 1);
+ rb_int_export(from, &sign, NULL, RSTRING_PTR(buf), RSTRING_LEN(buf), 1, 1, 1, 1);
if (sign < 0)
rb_raise(rb_eArgError, "can't compress negative numbers");