mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-06-05 21:49:48 +02:00
fixed off-by-one error
This commit is contained in:
@@ -34,8 +34,8 @@ public class AssetFilePutRequest extends FilePutRequest {
|
||||
}
|
||||
|
||||
private static byte[] prepareFileData(AssetFile file){
|
||||
int size = file.getFileName().length() + file.getFileData().length;
|
||||
ByteBuffer buffer = ByteBuffer.allocate(size + 3);
|
||||
int size = file.getFileName().length() + file.getFileData().length + 1 /**null byte **/;
|
||||
ByteBuffer buffer = ByteBuffer.allocate(size + 2);
|
||||
|
||||
buffer.order(ByteOrder.LITTLE_ENDIAN);
|
||||
|
||||
|
Reference in New Issue
Block a user