diff options
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | font.c | 4 |
2 files changed, 2 insertions, 4 deletions
@@ -75,7 +75,7 @@ ____-__-__: Version 1.3 - Use pkg-config to find compilation flags, libs etc for Imlib2. - Fixed crash with FrontendHasLock and FrontendHasSignal (closes #147 - thanks to a.g.prosat at tochka.ru for reporting this) -- Replaced asprintf with cString::sprintf in GetFrontend*() +- Replaced asprintf with cString::sprintf in GetFrontend*(), font loading. - Removed useless code in loader.c - Replace internal freetype font handling with VDR's font facilities. Skins that use fonts other than VDR's standard "Osd", "Fix", and "Sml" need to be @@ -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; } |