From 09db33286d61ce033eba56965c3f19400dd8ad07 Mon Sep 17 00:00:00 2001 From: Colin Cornaby Date: Sat, 17 Feb 2024 22:00:19 -0800 Subject: [PATCH] Moving variables into while loop --- Sources/Plasma/Apps/plClient/Mac-Cocoa/PLSPatcher.mm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Sources/Plasma/Apps/plClient/Mac-Cocoa/PLSPatcher.mm b/Sources/Plasma/Apps/plClient/Mac-Cocoa/PLSPatcher.mm index 954b92a104..d6915e9d08 100644 --- a/Sources/Plasma/Apps/plClient/Mac-Cocoa/PLSPatcher.mm +++ b/Sources/Plasma/Apps/plClient/Mac-Cocoa/PLSPatcher.mm @@ -196,12 +196,12 @@ bool IApproveDownload(const plFileName& file) static la_ssize_t copy_data(struct archive *ar, struct archive *aw) { - la_ssize_t r; - const void *buff; - size_t size; - la_int64_t offset; - while (true) { + la_ssize_t r; + const void *buff; + size_t size; + la_int64_t offset; + r = archive_read_data_block(ar, &buff, &size, &offset); if (r == ARCHIVE_EOF) return (ARCHIVE_OK);