Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strange code in AbDfInW.pas #15

Open
tomas303 opened this issue Jul 2, 2021 · 1 comment
Open

strange code in AbDfInW.pas #15

tomas303 opened this issue Jul 2, 2021 · 1 comment

Comments

@tomas303
Copy link

tomas303 commented Jul 2, 2021

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

@romankassebaum
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants