1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-02 11:26:09 +02: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];
while (zipInputStream.read(buffer, 0, buffer.length) != -1) {
json.append(new String(buffer));
int read;
while ((read = zipInputStream.read(buffer, 0, buffer.length)) != -1) {
json.append(new String(buffer, 0, read));
}
Gson gson = new Gson();