From c0542dc4cef38987a1e377ac5d31a8987c9955d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Mon, 13 Jul 2009 18:06:58 +0300 Subject: Replace asprintf by cString::sprintf in font loading. --- font.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'font.c') diff --git a/font.c b/font.c index f1cff09..e52c9db 100644 --- a/font.c +++ b/font.c @@ -67,12 +67,10 @@ const cFont *cText2SkinFont::Load(const string &Name, int Size) return cFont::GetFont(fontSml); const cFont *res = NULL; - char *cachename; - asprintf(&cachename, "%s_%d", Name.c_str(), Size); + string cachename = string(cString::sprintf("%s_%d", Name.c_str(), Size)); if (mFontCache.Load(Name, cachename, Size)) res = mFontCache.GetFont(cachename); else esyslog("ERROR: Text2Skin: Couldn't load font %s@%d", Name.c_str(), Size); - free(cachename); return res; } -- cgit v1.2.3