mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/openssl/ossl.c (ossl_raise): refine message format.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
832b1e88f5
commit
d238fd1322
2 changed files with 24 additions and 1 deletions
|
@ -292,7 +292,8 @@ ossl_raise(VALUE exc, const char *fmt, ...)
|
|||
else
|
||||
msg = ERR_reason_error_string(e);
|
||||
ERR_clear_error();
|
||||
len += snprintf(buf+len, BUFSIZ-len, ": %s", msg);
|
||||
fmt = len ? ": %s" : "%s";
|
||||
len += snprintf(buf+len, BUFSIZ-len, fmt, msg);
|
||||
}
|
||||
|
||||
if(len > BUFSIZ) len = strlen(buf);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue