mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-23 13:09:00 +00:00
(loader) Correctly clamp document size
This commit is contained in:
parent
55b2b7636b
commit
23759a7243
@ -105,7 +105,7 @@ public class IndexJournalWriterSingleFileImpl implements IndexJournalWriter{
|
||||
}
|
||||
|
||||
dataBuffer.putShort((short) recordSize);
|
||||
dataBuffer.putShort((short) Math.clamp(0, header.documentSize(), Short.MAX_VALUE));
|
||||
dataBuffer.putShort((short) Math.clamp(header.documentSize(), 0, Short.MAX_VALUE));
|
||||
dataBuffer.putInt(header.documentFeatures());
|
||||
dataBuffer.putLong(header.combinedId());
|
||||
dataBuffer.putLong(header.documentMeta());
|
||||
|
Loading…
Reference in New Issue
Block a user