Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2021-04

Array range overflow in properties

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Ryan Joseph

Is this a bug in properties and I should be getting an error?

type
	TPixel = record
	  components: array[0..3] of byte;
	  property R: byte read components[10] write components[10];
	end;

Regards,
Ryan Joseph

Reply by email

Sven Barth
to Ryan Joseph
Ryan Joseph wrote 7 lines
Is this a bug in properties and I should be getting an error? type TPixel = record components: array[0..3] of byte; property R: byte read components[10] write components[10]; end;

Well, there should *at least* be a warning and an error if range checks are enabled... Please file a bug report.

Regards,
Sven

Reply by email