mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-28 15:21:28 +01: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}
|
{$endif testsave}
|
||||||
{ release memory allocated for fonts }
|
{ release memory allocated for fonts }
|
||||||
for c := 1 to installedfonts do
|
for c := 1 to installedfonts do
|
||||||
If assigned(fonts[c].instr) Then
|
with fonts[c] Do
|
||||||
Freemem(fonts[c].instr,strlen(fonts[c].instr));
|
If assigned(instr) Then
|
||||||
|
Freemem(instr,instrlength);
|
||||||
{ release memory allocated for modelist }
|
{ release memory allocated for modelist }
|
||||||
list := ModeList;
|
list := ModeList;
|
||||||
while assigned(list) do
|
while assigned(list) do
|
||||||
@ -2876,7 +2877,10 @@ SetGraphBufSize
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
* reordered some local variables (first 4 byte vars, then 2 byte vars
|
||||||
etc)
|
etc)
|
||||||
* font data is now disposed in exitproc, exitproc is now called
|
* font data is now disposed in exitproc, exitproc is now called
|
||||||
|
|||||||
@ -65,7 +65,8 @@
|
|||||||
pheader : TFHeader; { prefix header }
|
pheader : TFHeader; { prefix header }
|
||||||
offsets : TOffsetTable;
|
offsets : TOffsetTable;
|
||||||
widths : TWidthTable;
|
widths : TWidthTable;
|
||||||
instr : pchar;
|
instrlength: longint; { length of instr, because instr can }
|
||||||
|
instr : pchar; { contain null characters }
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -116,6 +117,7 @@
|
|||||||
inc(installedfonts);
|
inc(installedfonts);
|
||||||
fonts[installedfonts].name:=FontFileName;
|
fonts[installedfonts].name:=FontFileName;
|
||||||
fonts[installedfonts].instr := nil;
|
fonts[installedfonts].instr := nil;
|
||||||
|
fonts[installedfonts].instrlength := 0;
|
||||||
InstallUserFont:=installedfonts;
|
InstallUserFont:=installedfonts;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -298,6 +300,7 @@
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
fonts[b].instr:=FontData;
|
fonts[b].instr:=FontData;
|
||||||
|
fonts[b].instrlength:=Counter+1;
|
||||||
RegisterBGIfont:=b;
|
RegisterBGIfont:=b;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -707,6 +710,7 @@
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
fonts[font].instr:=FontData;
|
fonts[font].instr:=FontData;
|
||||||
|
fonts[font].instrLength:=Length+1;
|
||||||
|
|
||||||
|
|
||||||
if not testfont(Prefix) then
|
if not testfont(Prefix) then
|
||||||
@ -727,7 +731,10 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
* reordered some local variables (first 4 byte vars, then 2 byte vars
|
||||||
etc)
|
etc)
|
||||||
* font data is now disposed in exitproc, exitproc is now called
|
* font data is now disposed in exitproc, exitproc is now called
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user