9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-21 11:03:29 +01:00

csf fix segfault

This commit is contained in:
Yann Damour 2022-03-22 10:49:39 +01:00
parent b70ae8dc58
commit 22b28fc774

View File

@ -52,10 +52,15 @@
ncfgpersomo = cfg_seniority_index(i+2) ncfgpersomo = cfg_seniority_index(i+2)
else else
k = 0 k = 0
do while(cfg_seniority_index(i+2+k) < ncfgpersomo) if ((i+2+k) < size(cfg_seniority_index,1)) then
k = k + 2 do while(cfg_seniority_index(i+2+k) < ncfgpersomo)
ncfgpersomo = cfg_seniority_index(i+2+k) k = k + 2
enddo if ((i+2+k) >= size(cfg_seniority_index,1)) then
exit
endif
ncfgpersomo = cfg_seniority_index(i+2+k)
enddo
endif
endif endif
endif endif
ncfg = ncfgpersomo - ncfgprev ncfg = ncfgpersomo - ncfgprev
@ -75,10 +80,15 @@
ncfgprev = cfg_seniority_index(i+2) ncfgprev = cfg_seniority_index(i+2)
else else
k = 0 k = 0
do while(cfg_seniority_index(i+2+k) < ncfgprev) if ((i+2+k) < size(cfg_seniority_index,1)) then
k = k + 2 do while(cfg_seniority_index(i+2+k) < ncfgprev)
ncfgprev = cfg_seniority_index(i+2+k) k = k + 2
enddo if ((i+2+k) >= size(cfg_seniority_index,1)) then
exit
endif
ncfgprev = cfg_seniority_index(i+2+k)
enddo
endif
endif endif
enddo enddo
END_PROVIDER END_PROVIDER