From: joncruz Date: Fri, 2 Jun 2006 07:05:40 +0000 (+0000) Subject: Fix for delete[] and binary comment X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3027d46e220d40848a2a56135aa0cbe2384c2ae4;p=inkscape.git Fix for delete[] and binary comment --- diff --git a/ChangeLog b/ChangeLog index 7e1ce4a4d..8284e8ebc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-06-01 Jon A. Cruz + + * src/extension/internal/pdf-mini.h + + Fix for delete[] mismatch and binary tweak from Ulf Erikson. + 2006-06-01 Jon A. Cruz * src/dialogs/layers-panel.h, src/dialogs/layers-panel.cpp: diff --git a/src/extension/internal/pdf-mini.h b/src/extension/internal/pdf-mini.h index d12196a6d..62b03a8f2 100644 --- a/src/extension/internal/pdf-mini.h +++ b/src/extension/internal/pdf-mini.h @@ -170,11 +170,12 @@ long PdfFile::tell() { PdfObject *PdfFile::begin_document(double version) { Inkscape::SVGOStringStream os; - + char bin[5] = {0x80|'B', 0x80|'i', 0x80|'n', 0x80|'!', 0}; length = 0; pages = new PdfXref();; os << "%PDF-" << version << "\n"; + os << "%" << bin << "\n"; obj_info = begin_object(); *obj_info << "<<\n"; @@ -312,7 +313,7 @@ void PdfFile::end_page(PdfObject *page) { delete obj_length; delete obj_contents; - delete resources; + delete[] resources; } PdfObject *PdfFile::begin_object() {