summaryrefslogtreecommitdiff
path: root/src/cairo-cff-subset.c
diff options
context:
space:
mode:
authorAndrea Canciani <ranma42@gmail.com>2011-07-29 11:56:40 +0200
committerAndrea Canciani <ranma42@gmail.com>2011-07-29 11:56:40 +0200
commit93c8b1090b887847c44780ea0e311a454e7978c1 (patch)
tree81195dea6cad8be12b3ffc68885d0db07182c576 /src/cairo-cff-subset.c
parentad3ef3a8fb560a2bd528ccd15469bbe9a1ddcee8 (diff)
downloadcairo-93c8b1090b887847c44780ea0e311a454e7978c1.tar.gz
cff-subset: Do not use garbage values
The code incorrectly initialized the fields of the data structure, which are about to be overwritten, instead of the temporary variables which are used to compute them.
Diffstat (limited to 'src/cairo-cff-subset.c')
-rw-r--r--src/cairo-cff-subset.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cairo-cff-subset.c b/src/cairo-cff-subset.c
index 918a0b290..3dabc927c 100644
--- a/src/cairo-cff-subset.c
+++ b/src/cairo-cff-subset.c
@@ -1078,10 +1078,10 @@ cairo_cff_font_read_font_metrics (cairo_cff_font_t *font, cairo_hash_table_t *t
double x_min, y_min, x_max, y_max;
double xx, yx, xy, yy;
- font->x_min = 0.0;
- font->y_min = 0.0;
- font->x_max = 0.0;
- font->y_max = 0.0;
+ x_min = 0.0;
+ y_min = 0.0;
+ x_max = 0.0;
+ y_max = 0.0;
p = cff_dict_get_operands (font->top_dict, FONTBBOX_OP, &size);
if (p) {
end = p + size;