mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-29 21:04:23 +01:00
Update the write_varint method to use an encoded buffer of size 9 instead of 10.
The SQLite varint specification states that the varint is guaranteed to be a maximum of 9 bytes, but our version of write_varint initializes a buffer of 10 bytes. Changing the size to match the specification.
This commit is contained in:
@@ -130,7 +130,7 @@ pub fn write_varint(buf: &mut [u8], value: u64) -> usize {
|
||||
return 9;
|
||||
}
|
||||
|
||||
let mut encoded: [u8; 10] = [0; 10];
|
||||
let mut encoded: [u8; 9] = [0; 9];
|
||||
let mut bytes = value;
|
||||
let mut n = 0;
|
||||
while bytes != 0 {
|
||||
|
||||
Reference in New Issue
Block a user