Merge pull request #11174 from AdmiralCurtiss/news-channel-fix

IOS/NetKDRequest: Don't abort on first unset bit in subtask mask.
This commit is contained in:
Admiral H. Curtiss 2022-10-16 21:14:43 +02:00 committed by GitHub
commit 892ab87e65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 10 deletions

View File

@ -267,17 +267,14 @@ IPCReply NetKDRequestDevice::HandleNWC24DownloadNowEx(const IOCtlRequest& reques
{ {
for (u8 subtask_id = 0; subtask_id < 32; subtask_id++) for (u8 subtask_id = 0; subtask_id < 32; subtask_id++)
{ {
// Check if we are done if (Common::ExtractBit(subtask_bitmask, subtask_id))
if (!Common::ExtractBit(subtask_bitmask, subtask_id))
{ {
break; reply = KDDownload(entry_index, subtask_id);
} if (reply != NWC24::WC24_OK)
{
reply = KDDownload(entry_index, subtask_id); // An error has occurred, break out and return error.
if (reply != NWC24::WC24_OK) break;
{ }
// An error has occurred, break out and return error.
break;
} }
} }
} }