mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-26 10:35:50 +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){
|
private static byte[] prepareFileData(AssetFile file){
|
||||||
int size = file.getFileName().length() + file.getFileData().length;
|
int size = file.getFileName().length() + file.getFileData().length + 1 /**null byte **/;
|
||||||
ByteBuffer buffer = ByteBuffer.allocate(size + 3);
|
ByteBuffer buffer = ByteBuffer.allocate(size + 2);
|
||||||
|
|
||||||
buffer.order(ByteOrder.LITTLE_ENDIAN);
|
buffer.order(ByteOrder.LITTLE_ENDIAN);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user