Page 2 of 2

Re: CAPS library v5.1 - bug suspected

Posted: Fri Mar 29, 2019 9:58 pm
by IFW
It's been a while... but the next library release will fix this problem - not that anyone else has ever encountered it (apart from myself getting reminded by a regression test yesterday), but still... :lol:

Thanks again for reporting this!

Re: CAPS library v5.1 - bug suspected

Posted: Sun Mar 31, 2019 12:13 pm
by IFW
For the record, the correct fix (released with the new library sometime) is as follows:

Code: Select all

void CCapsImage::FindWeakBits()
	PDISKTRACKINFO pti = di.pdt;

	// nothing to do if samples are not available
	if (pti->rawtrackcnt <= 0)

	// true if all the available revolutions should be returned
	int allrev = (pti->trackcnt == pti->rawtrackcnt);

	// use a single revolution if all the revolutions are returned at once, otherwise all the sampled revolutions
	int maxrev = allrev ? 1 : pti->rawtrackcnt;

	// process all revolutions
	for (int rev = 0; rev < maxrev; rev++) {