Skip to content

Commit

Permalink
Fix coverity defect: Uncaught Exception
Browse files Browse the repository at this point in the history
  • Loading branch information
nico-abram committed Mar 30, 2018
1 parent 3835fb3 commit 228fc16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/HighScore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -672,13 +672,13 @@ bool HighScore::LoadReplayData() {

noteRow = std::stoi(tokens[0]);
if (!(typeid(noteRow) == typeid(int))) {
throw std::runtime_error("NoteRow value is not of type: int");
LOG->Warn("Failed to load replay data at %s (\"NoteRow value is not of type: int\")", path.c_str());
}
vNoteRowVector.emplace_back(noteRow);

offset = std::stof(tokens[1]);
if (!(typeid(offset) == typeid(float))) {
throw std::runtime_error("Offset value is not of type: float");
LOG->Warn("Failed to load replay data at %s (\"Offset value is not of type: float\")", path.c_str());
}
vOffsetVector.emplace_back(offset);
tokens.clear();
Expand Down

0 comments on commit 228fc16

Please sign in to comment.