Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
e38ac6e2
Commit
e38ac6e2
authored
Apr 04, 2008
by
Jason Rumney
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(uniscribe_check_otf): Add GC protection before consing.
Use CAR_SAFE to increment loop.
parent
e6fa807c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
src/w32uniscribe.c
src/w32uniscribe.c
+6
-1
No files found.
src/w32uniscribe.c
View file @
e38ac6e2
...
@@ -563,6 +563,7 @@ int uniscribe_check_otf (font, otf_spec)
...
@@ -563,6 +563,7 @@ int uniscribe_check_otf (font, otf_spec)
HFONT
check_font
,
old_font
;
HFONT
check_font
,
old_font
;
DWORD
table
;
DWORD
table
;
int
i
,
retval
=
0
;
int
i
,
retval
=
0
;
struct
gcpro
gcpro1
;
/* Check the spec is in the right format. */
/* Check the spec is in the right format. */
if
(
!
CONSP
(
otf_spec
)
||
Flength
(
otf_spec
)
<
3
)
if
(
!
CONSP
(
otf_spec
)
||
Flength
(
otf_spec
)
<
3
)
...
@@ -599,6 +600,10 @@ int uniscribe_check_otf (font, otf_spec)
...
@@ -599,6 +600,10 @@ int uniscribe_check_otf (font, otf_spec)
check_font
=
CreateFontIndirect
(
font
);
check_font
=
CreateFontIndirect
(
font
);
old_font
=
SelectObject
(
context
,
check_font
);
old_font
=
SelectObject
(
context
,
check_font
);
/* Everything else is contained within otf_spec so should get
marked along with it. */
GCPRO1
(
otf_spec
);
/* Scan GSUB and GPOS tables. */
/* Scan GSUB and GPOS tables. */
for
(
i
=
0
;
i
<
2
;
i
++
)
for
(
i
=
0
;
i
<
2
;
i
++
)
{
{
...
@@ -676,7 +681,7 @@ int uniscribe_check_otf (font, otf_spec)
...
@@ -676,7 +681,7 @@ int uniscribe_check_otf (font, otf_spec)
documentation in font_prop_validate_otf, so count them. */
documentation in font_prop_validate_otf, so count them. */
n_match_features
=
0
;
n_match_features
=
0
;
rest
=
features
[
i
];
rest
=
features
[
i
];
for
(
feature
=
XCAR
(
rest
);
CONSP
(
rest
);
feature
=
X
CAR
(
rest
))
for
(
feature
=
XCAR
(
rest
);
CONSP
(
rest
);
feature
=
CAR
_SAFE
(
rest
))
{
{
rest
=
XCDR
(
rest
);
rest
=
XCDR
(
rest
);
if
(
!
NILP
(
feature
))
if
(
!
NILP
(
feature
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment