TurboPack / Abbrevia

Abbrevia is a compression toolkit for Delphi and C++Builder.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

strange code in AbDfInW.pas

tomas303 opened this issue · comments

Hi,

I came across code in procedure TAbDfInputWindow.iwSlide; and don't get it(win64 compilation, but it don't matter):

Buffer := Integer(FBuffer);
.....
if (ListItem^ < Buffer) then
ListItem^ := 0;

If depends on where FBuffer is allocated. I made a test(zip file) and even though in one case Buffer came positive and in second case negative(so code behaved differently in this place), overall result was the same. Is it a potential bug? Can somebody shed a bit light on the matter?

tomas

I changed the datatype from an Integer to a NativeInt, since the content seems to be a Pointer. Could you please check in your test project?