From 554c0c5a2a4ba5a939cf79eb854f01f64a371c48 Mon Sep 17 00:00:00 2001 From: pierre Date: Mon, 5 Mar 2018 21:43:28 +0000 Subject: [PATCH] Avoid to access past length of string in last commit git-svn-id: trunk@38417 - --- compiler/utils/msg2inc.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/utils/msg2inc.pp b/compiler/utils/msg2inc.pp index a0434dfd02..f10171fb4a 100644 --- a/compiler/utils/msg2inc.pp +++ b/compiler/utils/msg2inc.pp @@ -102,7 +102,7 @@ begin begin if s=']' then multiline:=false - else if (s[1] <> '#') then + else if (s='') or (s[1] <> '#') then inc(msgsize,length(s)+1); { +1 for linebreak } end else @@ -191,7 +191,7 @@ begin ptxt^:=#0; inc(ptxt); end - else if (s[1] <> '#') then + else if (s='') or (s[1] <> '#') then begin move(s[1],ptxt^,length(s)); inc(ptxt,length(s));