1
0
Fork 0
mirror of https://gitlab.com/Mr_Goldberg/goldberg_emulator.git synced 2024-11-14 10:50:13 +01:00

Fix crash when one of the lobby keys which was supposed to be an int was not an int.

This commit is contained in:
Mr_Goldberg 2019-09-22 11:35:27 -04:00
parent 5ed9a7aa77
commit 75dd582dec
No known key found for this signature in database
GPG key ID: 8597D87419DEF278

View file

@ -1152,7 +1152,8 @@ void RunCallbacks()
}
}
} else {
int compare_to = stoi(value->second, 0, 0);
try {
int compare_to = std::stoi(value->second, 0, 0);
PRINT_DEBUG("Compare Values %i %i\n", compare_to, f.value_int);
if (f.eComparisonType == k_ELobbyComparisonEqual) {
if (compare_to == f.value_int) {
@ -1163,6 +1164,10 @@ void RunCallbacks()
use = false;
}
}
} catch (...) {
//Same case as if the key is not in the lobby?
use = false;
}
//TODO: add more comparisons
}
} else {