[misc] prefer strtol/strtoull over atol/atoll

* This means we don't need to worry about conversion issues regarding signedess. In addition,
  the behavior will no longer be undefined if for some reason the conversion cannot happen.
* Closes #2104.
This commit is contained in:
Rose 2022-12-05 16:57:41 +00:00 committed by Pete Batard
parent 2bc1428975
commit fab095c043
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
3 changed files with 8 additions and 8 deletions

View file

@ -428,7 +428,7 @@ uint64_t DownloadToFileOrBuffer(const char* url, const char* file, BYTE** buffer
uprintf("Unable to retrieve file length: %s", WinInetErrorString());
goto out;
}
total_size = (uint64_t)atoll(strsize);
total_size = strtoull(strsize, NULL, 10);
if (hProgressDialog != NULL) {
char msg[128];
uprintf("File length: %s", SizeToHumanReadable(total_size, FALSE, FALSE));