Skip to content

Commit 3ca6ae9

Browse files
committed
Fixed a bug if something was of length 0
1 parent 2efedf3 commit 3ca6ae9

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/outputting.hpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,11 @@ void output(std::string scramble, float avg)
8686

8787
for (std::string &line : scrambleLines)
8888
{
89-
if (line.at(0) == ' ')
90-
{
91-
line.erase(0, 1);
89+
if(line.length() < 0){
90+
if (line.at(0) == ' ')
91+
{
92+
line.erase(0, 1);
93+
}
9294
}
9395

9496
std::cout << line << std::endl;
@@ -177,4 +179,5 @@ void outputVersion()
177179
std::cout << "CLI_Timer version: 1.14\n\n";
178180
std::cout << "Scramble outputs ⅓ of the screen + avg to right" << std::endl;
179181
std::cout << "Moved the outputting code to another file." << std::endl;
182+
std::cout << "Fixed a bug if something was of length 0." << std::endl;
180183
}

0 commit comments

Comments
 (0)