Fix SDK Launcher display bug

If depot vector is empty, the SDK launcher will download all files in depot json, but still use the depot vector as the count for how many packages instead of the depot json array.
This commit is contained in:
Kawe Mazidjatari 2023-10-21 19:12:33 +02:00
parent ae098603bb
commit ac9d45b567

View File

@ -555,7 +555,9 @@ bool SDKLauncher_DownloadDepotList(nlohmann::json& manifest, CUtlVector<CUtlStri
AppendSlash(downloadLink, '/');
downloadLink.append(fileName);
pProgress->SetText(Format("Downloading package %i of %i...", i, depotList.Count()).c_str());
pProgress->SetText(Format("Downloading package %i of %i...", i,
!depotList.IsEmpty() ? depotList.Count() : (int)depotListArray.size()).c_str());
SDKLauncher_DownloadAsset(downloadLink.c_str(), pPath, fileName.c_str(), fileSize, "wb+", pProgress);
// Check if its a zip file, as these are