From cad2b985d61db6598f61711b2fd71b8a65f1f25a Mon Sep 17 00:00:00 2001 From: nickysn Date: Tue, 6 Jun 2017 14:57:22 +0000 Subject: [PATCH] * when creating the reverse endian .bcm file, zero fill all the records, before filling them in, so that the alignment space inside the records is filled with zeros, instead of random uninitialized bytes git-svn-id: trunk@36438 - --- utils/creumap.pp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/creumap.pp b/utils/creumap.pp index 7c607ec3e1..f487875a62 100644 --- a/utils/creumap.pp +++ b/utils/creumap.pp @@ -63,6 +63,7 @@ const BlockWrite(nef,AMap^.reversemap^,h.reverseMapLength); Close(nef); + FillChar(th,SizeOf(th),0); th.cpName := h.cpName; th.cp := SwapEndian(h.cp); th.mapLength := SwapEndian(h.mapLength); @@ -72,6 +73,7 @@ const Rewrite(oef); BlockWrite(oef,th,SizeOf(th)); pum := AMap^.map; + FillChar(um,SizeOf(um),0); for k := 0 to AMap^.lastchar do begin um.flag := pum^.flag; um.reserved := pum^.reserved; @@ -80,6 +82,7 @@ const Inc(pum); end; prm := AMap^.reversemap; + FillChar(rm,SizeOf(rm),0); for k := 0 to AMap^.reversemaplength - 1 do begin rm.unicode := SwapEndian(prm^.unicode); rm.char1 := prm^.char1;