Code

Fix for delete[] and binary comment
authorjoncruz <joncruz@users.sourceforge.net>
Fri, 2 Jun 2006 07:05:40 +0000 (07:05 +0000)
committerjoncruz <joncruz@users.sourceforge.net>
Fri, 2 Jun 2006 07:05:40 +0000 (07:05 +0000)
ChangeLog
src/extension/internal/pdf-mini.h

index 7e1ce4a4da2327c1d0dad1688ef38e3d4bdd7b03..8284e8ebcfeb2df6d69bad4c54a0c7a346a47f27 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-06-01  Jon A. Cruz  <jon@joncruz.org>
+
+       * src/extension/internal/pdf-mini.h
+
+         Fix for delete[] mismatch and binary tweak from Ulf Erikson.
+
 2006-06-01  Jon A. Cruz  <jon@joncruz.org>
 
        * src/dialogs/layers-panel.h, src/dialogs/layers-panel.cpp:
index d12196a6dc7407d171d26bb765faa9191aca1ab3..62b03a8f21bd5ae0225a2d1dd76f180fbfabedbf 100644 (file)
@@ -170,11 +170,12 @@ long PdfFile::tell() {
 \r
 PdfObject *PdfFile::begin_document(double version) {\r
     Inkscape::SVGOStringStream os;\r
-\r
+    char bin[5] = {0x80|'B', 0x80|'i', 0x80|'n', 0x80|'!', 0};\r
     length = 0;\r
     pages = new PdfXref();;\r
 \r
     os << "%PDF-" << version << "\n";\r
+    os << "%" << bin << "\n";\r
 \r
     obj_info = begin_object();\r
     *obj_info << "<<\n";\r
@@ -312,7 +313,7 @@ void PdfFile::end_page(PdfObject *page) {
     delete obj_length;\r
     delete obj_contents;\r
     \r
-    delete resources;\r
+    delete[] resources;\r
 }\r
 \r
 PdfObject *PdfFile::begin_object() {\r