From cb0144f07a1c2226279f0918588cf30587b98b8a Mon Sep 17 00:00:00 2001 From: Steven Smith Date: Sat, 28 May 2016 13:11:47 -0700 Subject: [PATCH] Simplify seed download. --- source/core/util.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/source/core/util.c b/source/core/util.c index 62416a9..6a21e89 100644 --- a/source/core/util.c +++ b/source/core/util.c @@ -288,11 +288,8 @@ Result util_import_seed(u64 titleId) { u32 responseCode = 0; if(R_SUCCEEDED(res = httpcBeginRequest(&context)) && R_SUCCEEDED(res = httpcGetResponseStatusCode(&context, &responseCode, 0))) { if(responseCode == 200) { - u32 pos = 0; u32 bytesRead = 0; - while(pos < sizeof(seed) && (R_SUCCEEDED(res = httpcDownloadData(&context, &seed[pos], sizeof(seed) - pos, &bytesRead)) || res == HTTPC_RESULTCODE_DOWNLOADPENDING)) { - pos += bytesRead; - } + res = httpcDownloadData(&context, seed, sizeof(seed), &bytesRead); } else { res = R_FBI_HTTP_RESPONSE_CODE; }