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

Fixes\adaptation for 64-bit Windows support #8

Open
devEric69 opened this issue Oct 8, 2020 · 0 comments
Open

Fixes\adaptation for 64-bit Windows support #8

devEric69 opened this issue Oct 8, 2020 · 0 comments

Comments

@devEric69
Copy link

devEric69 commented Oct 8, 2020

Hello,

In order to have an identical behavior of MixBlock procedure (using a Longint variable i.e. a 32 bits), on a 32bits or 64bits CPU, I propose this adaptation in the unit onguard.pas:

The old code...

{$I onguard.inc}
{$I-} { I/O checks disabled}
{$Q-} {Integer overflow check disabled.
Warning : at least one function (MixBlock) causes overflow}

...should become:

{$I onguard.inc}
{$I-} { I/O checks disabled}
{$IFDEF CPU32} // proposal of fix, for an identical behavior of MixBlock and HashElf (at least) using a Longint variable (32 bits), on a 32bits or 64bits CPU
  {$Q-}
{$ENDIF}
{$IFDEF CPU64}
  {$Q-}
  {$R-}
{$ENDIF} {Integer overflow check disabled.
Warning : at least one function (MixBlock) causes overflow} 

Regards.

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

1 participant