mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-24 22:32:19 +02:00
* fix for disposing font data because it can contain #0 chars
This commit is contained in:
parent
03980540bd
commit
85f0d28bf1
@ -2818,8 +2818,9 @@ end;
|
||||
{$endif testsave}
|
||||
{ release memory allocated for fonts }
|
||||
for c := 1 to installedfonts do
|
||||
If assigned(fonts[c].instr) Then
|
||||
Freemem(fonts[c].instr,strlen(fonts[c].instr));
|
||||
with fonts[c] Do
|
||||
If assigned(instr) Then
|
||||
Freemem(instr,instrlength);
|
||||
{ release memory allocated for modelist }
|
||||
list := ModeList;
|
||||
while assigned(list) do
|
||||
@ -2876,7 +2877,10 @@ SetGraphBufSize
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.31 1999-09-28 13:56:25 jonas
|
||||
Revision 1.32 1999-09-28 15:07:46 jonas
|
||||
* fix for disposing font data because it can contain #0 chars
|
||||
|
||||
Revision 1.31 1999/09/28 13:56:25 jonas
|
||||
* reordered some local variables (first 4 byte vars, then 2 byte vars
|
||||
etc)
|
||||
* font data is now disposed in exitproc, exitproc is now called
|
||||
|
||||
@ -65,7 +65,8 @@
|
||||
pheader : TFHeader; { prefix header }
|
||||
offsets : TOffsetTable;
|
||||
widths : TWidthTable;
|
||||
instr : pchar;
|
||||
instrlength: longint; { length of instr, because instr can }
|
||||
instr : pchar; { contain null characters }
|
||||
end;
|
||||
|
||||
|
||||
@ -116,6 +117,7 @@
|
||||
inc(installedfonts);
|
||||
fonts[installedfonts].name:=FontFileName;
|
||||
fonts[installedfonts].instr := nil;
|
||||
fonts[installedfonts].instrlength := 0;
|
||||
InstallUserFont:=installedfonts;
|
||||
end;
|
||||
|
||||
@ -298,6 +300,7 @@
|
||||
exit;
|
||||
end;
|
||||
fonts[b].instr:=FontData;
|
||||
fonts[b].instrlength:=Counter+1;
|
||||
RegisterBGIfont:=b;
|
||||
end;
|
||||
end;
|
||||
@ -707,6 +710,7 @@
|
||||
exit;
|
||||
end;
|
||||
fonts[font].instr:=FontData;
|
||||
fonts[font].instrLength:=Length+1;
|
||||
|
||||
|
||||
if not testfont(Prefix) then
|
||||
@ -727,7 +731,10 @@
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.6 1999-09-28 13:56:29 jonas
|
||||
Revision 1.7 1999-09-28 15:07:47 jonas
|
||||
* fix for disposing font data because it can contain #0 chars
|
||||
|
||||
Revision 1.6 1999/09/28 13:56:29 jonas
|
||||
* reordered some local variables (first 4 byte vars, then 2 byte vars
|
||||
etc)
|
||||
* font data is now disposed in exitproc, exitproc is now called
|
||||
|
||||
Loading…
Reference in New Issue
Block a user