From 33d40a08af97bae7e12164c5df5c3d2029dcf182 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Thu, 25 Oct 2012 12:05:12 +0100 Subject: Unstackify RISC OS content handler's title setting. --- riscos/content-handlers/artworks.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'riscos/content-handlers/artworks.c') diff --git a/riscos/content-handlers/artworks.c b/riscos/content-handlers/artworks.c index af1a3773c..80733c680 100644 --- a/riscos/content-handlers/artworks.c +++ b/riscos/content-handlers/artworks.c @@ -172,7 +172,7 @@ bool artworks_convert(struct content *c) void *init_routine; os_error *error; int used = -1; /* slightly better with older OSLib versions */ - char title[512]; + char *title; /* check whether AWViewer has been seen and we can therefore locate the ArtWorks rendering modules */ @@ -263,10 +263,13 @@ bool artworks_convert(struct content *c) c->width = (aw->x1 - aw->x0) / 512; c->height = (aw->y1 - aw->y0) / 512; - snprintf(title, sizeof(title), messages_get("ArtWorksTitle"), + title = messages_get_buff("ArtWorksTitle", 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); /* Done: update status bar */ -- cgit v1.2.3