mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-25 18:15:49 +01:00
fixed off-by-one error
This commit is contained in:
parent
eb14715ef6
commit
fb8b4b4ce6
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user