summaryrefslogtreecommitdiff
path: root/ext/openssl
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-16 09:39:54 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-16 09:39:54 +0000
commitd238fd1322f6ef19208666f9fbb76533bbf56070 (patch)
treed447f5c6112e09642ce5b20971d5ac03e768fb23 /ext/openssl
parent832b1e88f5845b461a0cd48db8d7ecd940581193 (diff)
* 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
Diffstat (limited to 'ext/openssl')
-rw-r--r--ext/openssl/ossl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c
index 133b4e30ca..41659f0e81 100644
--- a/ext/openssl/ossl.c
+++ b/ext/openssl/ossl.c
@@ -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);