From 602a916e751a33864a367274f958a64d9593dc04 Mon Sep 17 00:00:00 2001 From: Rose <83477269+AtariDreams@users.noreply.github.com> Date: Mon, 5 Dec 2022 11:57:41 -0500 Subject: [PATCH] Use strtoull instead of 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. --- src/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net.c b/src/net.c index eb1fd136..8ba0de90 100644 --- a/src/net.c +++ b/src/net.c @@ -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); if (hProgressDialog != NULL) { char msg[128]; uprintf("File length: %s", SizeToHumanReadable(total_size, FALSE, FALSE));