]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/pfb-scheme.cc
Release: bump Welcome versions.
[lilypond.git] / lily / pfb-scheme.cc
index e718a13bf079f36c89708aebf65ddbcf1aa98611..37e44da8b05ed7fd1eff145b6c138b40c03c77ea 100644 (file)
@@ -25,16 +25,14 @@ LY_DEFINE (ly_type1_2_pfa, "ly:type1->pfa",
   if ((Byte) type1_string[0] == 0x80)
     {
       /* The file is in PFB format. Convert it to PFA format. */
-      char *pfa = pfb2pfa ((Byte *) &type1_string[0],
-                           (int) type1_string.size ());
-      pfa_scm = scm_from_latin1_string (pfa);
-      free (pfa);
+      vector<char> pfa = pfb2pfa (type1_string);
+      pfa_scm = scm_from_latin1_stringn (&pfa[0], pfa.size ());
     }
   else
     {
       /* The file is in PFA format. Pass it through. */
-      type1_string.push_back(0);
-      pfa_scm = scm_from_latin1_string (&type1_string[0]);
+      pfa_scm = scm_from_latin1_stringn (&type1_string[0],
+                                         type1_string.size ());
     }
 
   debug_output ("]", false);