This commit is contained in:
Guilhem Lavaux 2020-11-11 10:46:27 +01:00
parent 71691956cc
commit 9b148414b6
2 changed files with 8 additions and 2 deletions

View File

@ -81,7 +81,7 @@ cdef class CosmologyPower:
if 'ns' in cosmo: if 'ns' in cosmo:
self.power.n = cosmo['ns'] self.power.n = cosmo['ns']
if 'T27' in cosmo: if 'T27' in cosmo:
self.power.THETA_27 = cosmo['T27'] self.power.Theta_27 = cosmo['T27']
assert self.power.OMEGA_C > 0 assert self.power.OMEGA_C > 0

View File

@ -143,10 +143,16 @@ void UnformattedRead::endCheckpoint(bool autodrop)
delete[] recordBuffer; delete[] recordBuffer;
recordBuffer = 0; recordBuffer = 0;
} }
if (cSize == Check_32bits) {
if (checkPointAccum >= 1<<32UL) {
always_fail = true;
checkPointAccum %= (1<<32UL);
}
}
if (checkPointRef != checkPointAccum) if (checkPointRef != checkPointAccum)
{ {
if (!autodrop || checkPointAccum > checkPointRef) { if (always_fail || !autodrop || checkPointAccum > checkPointRef) {
throw InvalidUnformattedAccess(); throw InvalidUnformattedAccess();
} }
f->seekg(checkPointRef-checkPointAccum, ios::cur); f->seekg(checkPointRef-checkPointAccum, ios::cur);