Skip to content

Commit

Permalink
fix crash on unknown level upload date
Browse files Browse the repository at this point in the history
  • Loading branch information
Cvolton committed Sep 14, 2023
1 parent 8b9cb84 commit e3408bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/layers/ExtendedLevelInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ std::string ExtendedLevelInfo::printableProgress(std::string personalBests, int
}

std::string ExtendedLevelInfo::addPlus(std::string date) {
date.insert(date.cbegin() + date.find_first_of(' '), '+');
auto spaceIt = date.find_first_of(' ');
if(spaceIt != std::string::npos) date.insert(date.cbegin() + spaceIt, '+');
return date;
}

Expand Down

0 comments on commit e3408bd

Please sign in to comment.