There was an error while loading. Please reload this page.
1 parent 9440b50 commit dd562f8Copy full SHA for dd562f8
1 file changed
libsql-sqlite3/src/vectorfloat8.c
@@ -83,6 +83,8 @@ void vectorF8SerializeToBlob(
83
assert( nBlobSize >= vectorDataSize(pVector->type, pVector->dims) );
84
85
memcpy(pBlob, pVector->data, pVector->dims);
86
+ // pad the blob with 0's, up to the size of the data region defined in `vectorDataSize`
87
+ memset(pBlob + pVector->dims, 0, ALIGN(pVector->dims, sizeof(float)) - pVector->dims);
88
89
vectorF8GetParameters(pVector->data, pVector->dims, &alpha, &shift);
90
vectorF8SetParameters(pBlob, pVector->dims, alpha, shift);
0 commit comments