summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/bignum.c b/bignum.c
index 01c8824..5992662 100644
--- a/bignum.c
+++ b/bignum.c
@@ -206,6 +206,7 @@ rb_quad_pack(buf, val)
q = BIGUP(q);
q += ds[len];
}
+ if (!RBIGNUM(val)->sign) q = -q;
}
memcpy(buf, (char*)&q, SIZEOF_LONG_LONG);
}