[PATCH 2/2] print.c: show_dive_header() Reserve more space for strings

Lubomir I. Ivanov neolit123 at gmail.com
Tue Feb 5 15:10:41 PST 2013


From: "Lubomir I. Ivanov" <neolit123 at gmail.com>

Increase the size of "buffer" to 160 bytes. This was causing
a problem with the first call to pango_layout_text(), where
for the "bg_BG" locale, not enought space was allocated for the
month name, the translation of "dive" and the other values.

Signed-off-by: Lubomir I. Ivanov <neolit123 at gmail.com>
---
 print.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/print.c b/print.c
index 06da43b..7ddb5b9 100644
--- a/print.c
+++ b/print.c
@@ -62,7 +62,7 @@ static void show_dive_header(struct dive *dive, cairo_t *cr, double w,
 	int len, decimals, width, height, maxwidth, maxheight;
 	PangoLayout *layout;
 	struct tm tm;
-	char buffer[80], divenr[20], *people;
+	char buffer[160], divenr[20], *people;
 
 	maxwidth = w * PANGO_SCALE;
 	maxheight = h * PANGO_SCALE * 0.9;
-- 
1.7.11.msysgit.0



More information about the subsurface mailing list