From: oetiker Date: Fri, 4 Apr 2003 20:51:21 +0000 (+0000) Subject: I think I found a very small bug in rrd graph PDF output : the is_stream member of X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=4223ec6dd69776ac5bb8c7fc945191e589bdcf39;p=rrdtool.git 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/program@198 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/rrd_gfx.c b/src/rrd_gfx.c index bc57a90..28007cd 100644 --- a/src/rrd_gfx.c +++ b/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)