diff options
Diffstat (limited to 'ext/openssl/ossl.h')
-rw-r--r-- | ext/openssl/ossl.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/openssl/ossl.h b/ext/openssl/ossl.h index 22d0818d7e..1db7c08279 100644 --- a/ext/openssl/ossl.h +++ b/ext/openssl/ossl.h @@ -126,8 +126,8 @@ VALUE ossl_x509crl_sk2ary(STACK_OF(X509_CRL) *crl); VALUE ossl_buf2str(char *buf, int len); #define ossl_str_adjust(str, p) \ do{\ - int len = RSTRING_LEN(str);\ - int newlen = (p) - (unsigned char*)RSTRING_PTR(str);\ + int len = RSTRING_LENINT(str);\ + int newlen = rb_long2int((p) - (unsigned char*)RSTRING_PTR(str));\ assert(newlen <= len);\ rb_str_set_len((str), newlen);\ }while(0) |