summaryrefslogtreecommitdiff
path: root/ext/openssl
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-09-13 00:40:10 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-09-13 00:40:10 +0000
commit6ebb345dd7c634461fa0cc272d3590a86ebe2aad (patch)
treede4565fc5c7e9bed957d446c4c2bc54d98b25e75 /ext/openssl
parentf31eccfa183e7284b37edda6600397c724ee13cc (diff)
downloadruby-6ebb345dd7c634461fa0cc272d3590a86ebe2aad.tar.gz
* ext/openssl/ossl_bn.c (ossl_bn_is_prime): fix comparison
with rb_scan_args. Before this fix, OpenSSL::BN#prime? is fully broken. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl')
-rw-r--r--ext/openssl/ossl_bn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/openssl/ossl_bn.c b/ext/openssl/ossl_bn.c
index bec5135f12..6adc59fc1a 100644
--- a/ext/openssl/ossl_bn.c
+++ b/ext/openssl/ossl_bn.c
@@ -669,7 +669,7 @@ ossl_bn_is_prime(int argc, VALUE *argv, VALUE self)
VALUE vchecks;
int checks = BN_prime_checks;
- if (rb_scan_args(argc, argv, "01", &vchecks) == 0) {
+ if (rb_scan_args(argc, argv, "01", &vchecks) == 1) {
checks = NUM2INT(vchecks);
}
GetBN(self, bn);