diff options
Diffstat (limited to 'image/jpeg.c')
-rw-r--r-- | image/jpeg.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/image/jpeg.c b/image/jpeg.c index 7c68fb668..fd18238f7 100644 --- a/image/jpeg.c +++ b/image/jpeg.c @@ -289,7 +289,7 @@ static bool nsjpeg_convert(struct content *c) union content_msg_data msg_data; const char *data; unsigned long size; - char title[512]; + char *title; /* check image header is valid and get width/height */ data = content__get_source_data(c, &size); @@ -325,10 +325,14 @@ static bool nsjpeg_convert(struct content *c) image_cache_add(c, NULL, jpeg_cache_convert); - snprintf(title, sizeof(title), messages_get("JPEGTitle"), + /* set title text */ + title = messages_get_buff("JPEGTitle", 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); + } content_set_ready(c); content_set_done(c); |