X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Foutput%2Fcairo-fsm.c;h=2df39754343b966b3305c6a7393b17a3c9989625;hb=4a2dcede63a2fc6423301245b2e65c4b5f1aabbe;hp=90eb285dd28126e892569ec521a8167808599a2a;hpb=ab6a6170a426bbae24d65f7aedaa0c38913ca44c;p=pspp diff --git a/src/output/cairo-fsm.c b/src/output/cairo-fsm.c index 90eb285dd2..2df3975434 100644 --- a/src/output/cairo-fsm.c +++ b/src/output/cairo-fsm.c @@ -761,14 +761,17 @@ xr_layout_cell_text (struct xr_fsm *xr, const struct table_cell *cell, } size_t footnote_ofs = ds_length (&body); + size_t n_footnotes = 0; for (size_t i = 0; i < value->n_footnotes; i++) { - if (i) - ds_put_byte (&body, ','); - - size_t idx = value->footnote_indexes[i]; - const struct pivot_footnote *f = pt->footnotes[idx]; - pivot_value_format (f->marker, pt, &body); + const struct pivot_footnote *f + = pt->footnotes[value->footnote_indexes[i]]; + if (f->show) + { + if (n_footnotes++) + ds_put_byte (&body, ','); + pivot_footnote_format_marker (f, pt, &body); + } } /* Allow footnote markers to occupy the right margin. That way, numbers