Permalink
Browse files

spaces in (and after) cdkeys are now ignored

git-svn-id: http://ghostplusplus.googlecode.com/svn/trunk@493 a7494f72-a4b0-11dd-a887-7ffe1a420f8d
  • Loading branch information...
1 parent e03f395 commit 8fd1a702f539fcadc1a6eec891ddadc577ccbc00 xXZyZXx@gmail.com committed May 9, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 ghost/bnet.cpp
View
4 ghost/bnet.cpp
@@ -87,10 +87,12 @@ CBNET :: CBNET( CGHost *nGHost, string nServer, string nServerAlias, string nBNL
m_CDKeyROC = nCDKeyROC;
m_CDKeyTFT = nCDKeyTFT;
- // remove dashes from CD keys and convert to uppercase
+ // remove dashes and spaces from CD keys and convert to uppercase
m_CDKeyROC.erase( remove( m_CDKeyROC.begin( ), m_CDKeyROC.end( ), '-' ), m_CDKeyROC.end( ) );
m_CDKeyTFT.erase( remove( m_CDKeyTFT.begin( ), m_CDKeyTFT.end( ), '-' ), m_CDKeyTFT.end( ) );
+ m_CDKeyROC.erase( remove( m_CDKeyROC.begin( ), m_CDKeyROC.end( ), ' ' ), m_CDKeyROC.end( ) );
+ m_CDKeyTFT.erase( remove( m_CDKeyTFT.begin( ), m_CDKeyTFT.end( ), ' ' ), m_CDKeyTFT.end( ) );
transform( m_CDKeyROC.begin( ), m_CDKeyROC.end( ), m_CDKeyROC.begin( ), (int(*)(int))toupper );
transform( m_CDKeyTFT.begin( ), m_CDKeyTFT.end( ), m_CDKeyTFT.begin( ), (int(*)(int))toupper );

0 comments on commit 8fd1a70

Please sign in to comment.