diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2009-07-13 18:06:58 +0300 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2009-07-13 18:06:58 +0300 |
commit | c0542dc4cef38987a1e377ac5d31a8987c9955d3 (patch) | |
tree | 0b8196c35fb666fa786da4b1589c04c2857c0e4f | |
parent | 294e778e92f66570eea390686ba1189bb6821adb (diff) | |
download | vdr-plugin-text2skin-c0542dc4cef38987a1e377ac5d31a8987c9955d3.tar.gz vdr-plugin-text2skin-c0542dc4cef38987a1e377ac5d31a8987c9955d3.tar.bz2 |
Replace asprintf by cString::sprintf in font loading.
-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; } |