]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/pdf-scheme.cc
Run astyle 2.02.
[lilypond.git] / lily / pdf-scheme.cc
index ecfe5c4f01d2e973cfedf9648a9274031957ebb9..c0cfa8d9872b1218ca730efad15306e2f9f557da 100644 (file)
@@ -58,11 +58,11 @@ LY_DEFINE (ly_encode_string_for_pdf, "ly:encode-string-for-pdf",
        * though), we have to prepend it manually. */
       if (g_without_BOM) // conversion to UTF-16be might have failed (shouldn't!)
         {
-          g = new char[bytes_written + 3];
+          g = (char *)malloc ( sizeof (char) * (bytes_written + 3));
           char const *BOM = "\xFE\xFF";
           strcpy (g, BOM);
           memcpy (&g[2], g_without_BOM, bytes_written + 1); // Copy string + \0
-          free (g_without_BOM);
+          g_free (g_without_BOM);
           bytes_written += 2;
         }
     }