Fix some errors (#1020)

Fix some critical errors
This commit is contained in:
Unreal Karaulov
2021-12-03 00:47:57 +03:00
committed by GitHub
parent 5dcda02b65
commit 3cda059669
13 changed files with 37 additions and 23 deletions

View File

@ -229,8 +229,8 @@ void ListboxItemSelected(HWND hDlg) {
// Retrieve complete stats record of this position. Position in listbox should be same as rank in our records!
RankSystem::RankStats* stats = g_rank.findEntryInRankByPos((int)nItem + 1);
if (stats == NULL) {
char msg[] = "Error: Couldn't find the record by position! (nItem = %d)";
sprintf(msg, msg, nItem);
char msg[512];
sprintf(msg, "Error: Couldn't find the record by position! (nItem = %d)", nItem);
MessageBox(hDlg, msg, "Oh fiddlesticks!", MB_OK);
ClearStatsfields(hDlg);
return;