1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-29 12:05:53 +01:00

Fixed a bug where less than the requested length was read before EOF in PineTime DFU

This commit is contained in:
TaaviE 2022-09-07 16:44:19 +03:00 committed by Gitea
parent 004355f69f
commit 2928a0e13b

View File

@ -75,8 +75,9 @@ public class PineTimeInstallHandler implements InstallHandler {
final byte[] buffer = new byte[1024]; final byte[] buffer = new byte[1024];
while (zipInputStream.read(buffer, 0, buffer.length) != -1) { int read;
json.append(new String(buffer)); while ((read = zipInputStream.read(buffer, 0, buffer.length)) != -1) {
json.append(new String(buffer, 0, read));
} }
Gson gson = new Gson(); Gson gson = new Gson();