prevent IndexDefect when no parity data

This commit is contained in:
Eric 2024-06-11 13:45:02 +10:00
parent 3cff0d3a26
commit 2910b0434b
No known key found for this signature in database

View File

@ -142,8 +142,11 @@ func decode*(
else:
parityPtr[i] = nil
let
res = leoDecode(
let res =
if dataPtr.len == 0 or parityPtr.len == 0 or self.decodeBufferPtr.len == 0:
LeopardInvalidInput
else:
leoDecode(
self.bufSize.culonglong,
self.buffers.cuint,
self.parity.cuint,