Skip to content

Commit

Permalink
fix crash on green user restoration
Browse files Browse the repository at this point in the history
  • Loading branch information
Cvolton committed Jan 27, 2024
1 parent 8ecc902 commit d4fc48c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/managers/BetterInfoCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ std::string BetterInfoCache::getUserName(int userID, bool download) {
//if gdhistory was faster, this could be sync and the feature would be more efficient, sadly gdhistory is not faster
if(download && m_attemptedUsernames.find(userID) == m_attemptedUsernames.end()) {
web::AsyncWebRequest().fetch(fmt::format("https://history.geometrydash.eu/api/v1/user/{}/brief/", userID)).json().then([userID](const matjson::Value& data){
log::info("Restored green username for {}: {}", userID, data.as_string());
log::info("Restored green username for {}: {}", userID, data.dump(matjson::NO_INDENTATION));
std::string username;

if(data["non_player_username"].is_string()) username = data["non_player_username"].as_string();
Expand Down

0 comments on commit d4fc48c

Please sign in to comment.