Skip to content

Commit

Permalink
Fix weird crash for invalid utf charts
Browse files Browse the repository at this point in the history
  • Loading branch information
nico-abram committed Dec 1, 2018
1 parent 2592c6b commit e8f3cf4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/NetworkSyncManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,11 @@ NetworkSyncManager::ReportHighScore(HighScore* hs, PlayerStageStats& pss)
void
ETTProtocol::Send(json msg)
{
Send(msg.dump().c_str());
try {
Send(msg.dump().c_str());
} catch (exception e) {
SCREENMAN->SystemMessage("Error: Chart contains invalid utf8");
}
}
void
ETTProtocol::Send(const char* msg)
Expand Down

0 comments on commit e8f3cf4

Please sign in to comment.