mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 16:39:29 -05:00
Trim right spaces from certificate name.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5373 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
afe62dad28
commit
5a4d517188
@ -167,6 +167,13 @@ void PGPHandler::initCertificateInfo(PGPCertificateInfo& cert,const ops_keydata_
|
||||
uint32_t i=0;
|
||||
while(i < namestring.length() && namestring[i] != '(' && namestring[i] != '<') { cert._name += namestring[i] ; ++i ;}
|
||||
|
||||
// trim right spaces
|
||||
std::string::size_type found = cert._name.find_last_not_of(' ');
|
||||
if (found != std::string::npos)
|
||||
cert._name.erase(found + 1);
|
||||
else
|
||||
cert._name.clear(); // all whitespace
|
||||
|
||||
std::string& next = (namestring[i] == '(')?cert._comment:cert._email ;
|
||||
++i ;
|
||||
next = "" ;
|
||||
|
Loading…
Reference in New Issue
Block a user