Blob Blame Raw
diff -up a2ps-4.14/lib/psgen.c.mb a2ps-4.14/lib/psgen.c
--- a2ps-4.14/lib/psgen.c.mb	2008-09-24 15:29:30.000000000 +0100
+++ a2ps-4.14/lib/psgen.c	2008-09-24 15:29:30.000000000 +0100
@@ -96,7 +96,8 @@ ps_escape_char (a2ps_job * job, uchar c,
   /* Printable, but not 7bit clean caracters */
   if (encoding_char_exists (job->encoding, job->status->face, c)
       && ((0177 < c) || (c < 040))) {
-    sprintf ((char *)res, "%s\\%o", res, c);
+    char *p = res + strlen (res);
+    sprintf (p, "\\%o", c);
     return 1;
   }
 
@@ -893,8 +894,8 @@ ps_print_char (a2ps_job * job, int c, en
   if (c > 127 && encoding_get_composite_flag (job->encoding) &&
       job->status->face != Symbol) {
     if (mb_flag) {
-        nchars = ps_escape_char (job, mb_flag, buf) + 
-	         ps_escape_char (job, c, buf);
+        nchars = ps_escape_char (job, mb_flag, buf);
+	nchars += ps_escape_char (job, c, buf);
 	job->status->wx += char_composite_WX(job, c);
 	job->status->column += nchars;
 	if (line_full) {