From 07722e4b4a9f5e33ad94567c1b47ff00a9998996 Mon Sep 17 00:00:00 2001 From: oetiker Date: Fri, 4 Apr 2003 20:51:21 +0000 Subject: [PATCH] I think I found a very small bug in rrd graph PDF output : the is_stream member of pdf_buffer is not initialized, making bad PDF sometimes (I found a case where is_stream was != 0 for the font initialization). -- lhoudard@netcourrier.com git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@198 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_gfx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/program/src/rrd_gfx.c b/program/src/rrd_gfx.c index bc57a903..28007cde 100644 --- a/program/src/rrd_gfx.c +++ b/program/src/rrd_gfx.c @@ -1544,6 +1544,7 @@ static void pdf_init_object(pdf_state *state, pdf_buffer *buf) pdf_init_buffer(state, buf); buf->id = ++state->last_obj_id; buf->is_obj = 1; + buf->is_stream = 0; } static void pdf_init_dict(pdf_state *state, pdf_buffer *buf) @@ -1830,12 +1831,12 @@ static void pdf_init_document(pdf_state *state) pdf_init_dict(state, &state->pages_obj); pdf_init_dict(state, &state->page1_obj); pdf_init_dict(state, &state->fontsdict_obj); - state->graph_stream.is_stream = 1; pdf_create_fonts(state); if (state->has_failed) return; /* make stream last object in file */ pdf_init_object(state, &state->graph_stream); + state->graph_stream.is_stream = 1; } static void pdf_setup_document(pdf_state *state) -- 2.30.2