TBits.OpenBit
Original Reporter info from Mantis: nanobit @nanobit
-
Reporter name:
Original Reporter info from Mantis: nanobit @nanobit
- Reporter name:
Description:
function TBits.OpenBit: longint;
has 2 problems in the case when all bits are true:
- FPC help should say: returns the size (Delphi compatible, not -1)
- bug: sometimes fails to return the size (= position after last true bit).
Some code (like win32 popupmenu) already use this wrong result.
bug-Example:
bits := tbits.create(32);
for i := 0 to bits.size-1 do bits[i] := true;
pos := bits.openBit; // returns pos 64