diff options
author | Erich Eckner <git@eckner.net> | 2018-06-19 09:36:02 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-06-19 09:36:02 +0200 |
commit | 4aaf7caf77a926f5f78494797df3b09c5b144f18 (patch) | |
tree | 438a1f52ccf65aea4660e1d482a697cf1350a069 /epostunit.pas | |
parent | b9d89dc79ebc684f30460e2145414d48ae5da8a4 (diff) | |
download | epost-4aaf7caf77a926f5f78494797df3b09c5b144f18.tar.xz |
do not fail on empty data at several points
Diffstat (limited to 'epostunit.pas')
-rw-r--r-- | epostunit.pas | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/epostunit.pas b/epostunit.pas index b98a661..4ae54c1 100644 --- a/epostunit.pas +++ b/epostunit.pas @@ -6881,7 +6881,7 @@ begin case liKo^[0].werte.genauigkeit of //<<todo>> gSingle: for j:=tMi to tMa do begin - if (tMa-j) mod ((tMa-tMi) div 10) = 0 then + if (tMa-j) mod max((tMa-tMi) div 10,1) = 0 then gibAus('LiKo-Berechnungsthread: '+intToStr(j)+'/'+intToStr(tMi)+'..'+intToStr(tMa)+' ('+intToStr(xMi)+'..'+intToStr(xMa)+')',1); for i:=xMi to xMa do begin pW.eWerte.werte[i+j*pW._xSteps]:=0; @@ -6896,7 +6896,7 @@ begin end; gDouble: for j:=tMi to tMa do begin - if (tMa-j) mod ((tMa-tMi) div 10) = 0 then + if (tMa-j) mod max((tMa-tMi) div 10,1) = 0 then gibAus('LiKo-Berechnungsthread: '+intToStr(j)+'/'+intToStr(tMi)+'..'+intToStr(tMa)+' ('+intToStr(xMi)+'..'+intToStr(xMa)+')',1); for i:=xMi to xMa do begin pW.eWerte.werte[i+j*pW._xSteps]:=0; @@ -6911,7 +6911,7 @@ begin end; gExtended: for j:=tMi to tMa do begin - if (tMa-j) mod ((tMa-tMi) div 10) = 0 then + if (tMa-j) mod max((tMa-tMi) div 10,1) = 0 then gibAus('LiKo-Berechnungsthread: '+intToStr(j)+'/'+intToStr(tMi)+'..'+intToStr(tMa)+' ('+intToStr(xMi)+'..'+intToStr(xMa)+')',1); for i:=xMi to xMa do begin pW.eWerte.werte[i+j*pW._xSteps]:=0; @@ -7860,6 +7860,10 @@ begin result:=true; exit; end; + if (tMi>=tMa) or (xMi>=xMa) then begin + gibAus('Kaum Werte in '''+w^[i].bezeichner+''' um Kontur '''+bezeichner+''' daraus zu erzeugen ('+intToStr(xMi)+'-'+intToStr(xMa)+' x '+intToStr(tMi)+'-'+intToStr(tMa)+') von maximal '+intToStr(w^[i]._xSteps)+' x '+intToStr(w^[i]._tSiz),3); + exit; + end; setLength(konturThreads,mT); for j:=0 to length(konturThreads)-1 do konturThreads[j]:= |