fix getSector

This commit is contained in:
Tanguy 2021-10-05 19:29:38 +02:00 committed by Dmitriy Ryajov
parent 998aad6378
commit 09996476de
No known key found for this signature in database
GPG Key ID: DA8C680CE7C657A4

View File

@ -117,7 +117,7 @@ proc fromBytesBE(a: openArray[byte]): blst_scalar =
doAssert(blst_scalar_fr_check(result).bool)
proc getSector(f: File, blockid: int64, sectorid: int64, spb: int64): ZChar =
f.setFilePos(blockid * spb + sectorid)
f.setFilePos((blockid * spb + sectorid) * sizeof(result))
let r = f.readBytes(result, 0, sizeof(result))
proc rndScalar(): blst_scalar =