Classes.TBits.NotBits () does not do not, but xor.....
Original Reporter info from Mantis: Thaddy
-
Reporter name: Thaddy de Koning
Original Reporter info from Mantis: Thaddy
- Reporter name: Thaddy de Koning
Description:
Classes.TBits.NotBits() performs an xor operation instead of a not operation
Steps to reproduce:
procedure TBits.notbits(bitset : TBits);
var
n : longint;
loop : longint;
begin
if FSize < bitset.getFSize then
n := FSize - 1
else
n := bitset.getFSize - 1;
for loop := 0 to n do
FBits^[loop] := FBits^[loop] xor bitset.FBits^[loop]; // <----
end;
Additional information:
Correct is :
procedure TBits.notbits(bitset : TBits);
var
n : longint;
loop : longint;
begin
if FSize < bitset.getFSize then
n := FSize - 1
else
n := bitset.getFSize - 1;
for loop := 0 to n do
FBits^[loop] := not FBits^[loop] ;
end;
Mantis conversion info:
- Mantis ID: 35932
- OS: all
- OS Build: all
- Platform: all
- Version: 3.3.1