Patch level : 12.0 652

Files correlati     : cg1.exe sc2.exe
Commento            :
Corretto un errore sui cursori nella stampa bilancio di verifica per clienti/fornitori e sulla stampa solleciti
This commit is contained in:
AlexBonazzi 2018-12-05 14:56:20 +01:00
parent 283bf1412f
commit fdd0dd4fc9

View File

@ -1184,6 +1184,8 @@ TRecnotype TCursor::buildcursor(TRecnotype rp)
} }
_pagefirstpos = ap > _cmaxelpage ? -(_cmaxelpage + 1) : 0L ; _pagefirstpos = ap > _cmaxelpage ? -(_cmaxelpage + 1) : 0L ;
if (_pos < 0L)
_pos = 0L;
return ap; return ap;
} }
@ -1748,9 +1750,11 @@ TRecnotype TCursor::readrec()
} }
f.setstatus(NOERR); f.setstatus(NOERR);
if (_pos < _pagefirstpos || _pos >= _pagefirstpos + _cmaxelpage) if (_pos < 0)
_pos = 0;
if (_pos < _pagefirstpos || _pos >= _pagefirstpos + _cmaxelpage)
read_page(_pos / _cmaxelpage); read_page(_pos / _cmaxelpage);
nrec = _page[_pos - _pagefirstpos]; nrec = _page[_pos - _pagefirstpos];
CHECKD(nrec >= 0, "Bad record position ", nrec); CHECKD(nrec >= 0, "Bad record position ", nrec);
curr().setdirty(); curr().setdirty();