Fixed bug that cause an invalid grid string

This commit is contained in:
2018-05-16 14:16:34 -04:00
parent d54b34f4c2
commit 2db8752648

View File

@@ -15,7 +15,7 @@
* @brief The current library's version number * @brief The current library's version number
* *
*/ */
const std::string Playfair::version = "1.0"; const std::string Playfair::version = "1.0.1";
///The letter that needs replaced for the cipher to work ///The letter that needs replaced for the cipher to work
char Playfair::REPLACED = 'J'; char Playfair::REPLACED = 'J';
@@ -431,7 +431,8 @@ std::string Playfair::getGrid() const{
std::string temp; std::string temp;
for(int row = 0;row < 5;++row){ for(int row = 0;row < 5;++row){
for(int col = 0;col < 5;++col){ for(int col = 0;col < 5;++col){
temp += grid[row][col] + " "; temp += grid[row][col];
temp += " ";
} }
temp += '\n'; temp += '\n';
} }