diff options
Diffstat (limited to 'image/png.c')
-rw-r--r-- | image/png.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/image/png.c b/image/png.c index 99482d63d..23c755825 100644 --- a/image/png.c +++ b/image/png.c @@ -510,7 +510,7 @@ png_cache_convert_error: static bool nspng_convert(struct content *c) { nspng_content *png_c = (nspng_content *) c; - char title[512]; + char *title; assert(png_c->png != NULL); assert(png_c->info != NULL); @@ -519,11 +519,13 @@ static bool nspng_convert(struct content *c) png_destroy_read_struct(&png_c->png, &png_c->info, 0); /* set title text */ - snprintf(title, sizeof(title), messages_get("PNGTitle"), + title = messages_get_buff("PNGTitle", nsurl_access_leaf(llcache_handle_get_url(c->llcache)), c->width, c->height); - - content__set_title(c, title); + if (title != NULL) { + content__set_title(c, title); + free(title); + } if (png_c->bitmap != NULL) { bitmap_set_opaque(png_c->bitmap, bitmap_test_opaque(png_c->bitmap)); |