some languagedir related bugfixes.
authorkramm <kramm>
Mon, 1 Nov 2004 19:41:17 +0000 (19:41 +0000)
committerkramm <kramm>
Mon, 1 Nov 2004 19:41:17 +0000 (19:41 +0000)
pdf2swf/SWFOutputDev.cc

index 5186af3..4d05d03 100644 (file)
@@ -1952,14 +1952,14 @@ void pdfswf_addlanguagedir(char*dir)
 
     int l;
     FILE*fi = 0;
-    char* config_file = (char*)malloc(strlen(dir)+256);
+    char* config_file = (char*)malloc(strlen(dir) + 1 + sizeof("add-to-xpdfrc"));
     strcpy(config_file, dir);
     strcat(config_file, dirseparator());
     strcat(config_file, "add-to-xpdfrc");
 
     fi = fopen(config_file, "rb");
     if(!fi) {
-        msg("<error> Could not open %s");
+        msg("<error> Could not open %s", config_file);
         return;
     }
     globalParams->parseFile(new GString(config_file), fi);
@@ -2005,7 +2005,7 @@ void pdfswf_addfontdir(char*dirname)
     }
     closedir(dir);
 #else
-    msg("<warning> No dirent.h- unable to add font dir %s");
+    msg("<warning> No dirent.h- unable to add font dir %s", dir);
 #endif
 }