Skip to content

array-element assign bug

FPC 3.2.3 i386-win32-win32

{$R+}  // required
procedure test;
var
  k: integer;
  bytes: array of byte;
  hasBytes: array[0..3] of boolean;
begin
  k := high(hasBytes); // last element
  setLength(bytes, 10);
  hasBytes[k] := bytes <> nil;
  assert( hasBytes[k]); // fails
end; 
Edited by nanobit
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information