summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY2
-rw-r--r--font.c4
2 files changed, 2 insertions, 4 deletions
diff --git a/HISTORY b/HISTORY
index 03d1b17..56cb96a 100644
--- a/HISTORY
+++ b/HISTORY
@@ -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
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;
}