From c6c05f839595c5aff6f1cf930c2e0c8068b5caec Mon Sep 17 00:00:00 2001 From: Pierre Muller Date: Mon, 13 Jan 2025 13:14:42 +0000 Subject: [PATCH] Check that index value is not below lower bound in TMessage.Valid method --- compiler/cmsgs.pas | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler/cmsgs.pas b/compiler/cmsgs.pas index 2e3769faae..b4ac19b784 100644 --- a/compiler/cmsgs.pas +++ b/compiler/cmsgs.pas @@ -461,8 +461,12 @@ begin end; function TMessage.Valid(nr:longint):boolean; +var + i,j : longint; begin - result:=(nr div 1000=low(msgstates)) and (i