From 0efbe866de00c246b98e585ee33d36589e40be38 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 18 Sep 2006 21:55:07 +0000 Subject: [PATCH] fix (this is one reason the string class having an implicit cast to char* is bad; lots of things compile but don't work, causing bugs like this) --- stepmania/src/crypto/CryptRSA.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stepmania/src/crypto/CryptRSA.cpp b/stepmania/src/crypto/CryptRSA.cpp index af33c112fa..42e8c8a38d 100644 --- a/stepmania/src/crypto/CryptRSA.cpp +++ b/stepmania/src/crypto/CryptRSA.cpp @@ -337,7 +337,7 @@ void RSAKey::Fingerprint( char *str, int len ) const strncpy(str, buffer, len); str[len - 1] = '\0'; slen = strlen(str); - if (this->comment && slen < len - 1) + if (!this->comment.empty() && slen < len - 1) { str[slen] = ' '; strncpy(str + slen + 1, this->comment, len - slen - 1);