summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fcbdcd8)
raw | patch | inline | side by side (parent: fcbdcd8)
author | Lars-Dominik Braun <lars@6xq.net> | |
Tue, 12 Jun 2012 21:15:44 +0000 (23:15 +0200) | ||
committer | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | |
Tue, 12 Jun 2012 21:15:44 +0000 (23:15 +0200) |
[jn: adjusted the white space style]
src/strfsong.c | patch | blob | history |
diff --git a/src/strfsong.c b/src/strfsong.c
index 3d5abd5797dfd78e50e9515f72763efabf5ee7cc..e3d4eb98cda560fd56d291bee98ff18207f56499 100644 (file)
--- a/src/strfsong.c
+++ b/src/strfsong.c
if( temp == NULL) {
gsize templen=n;
/* just pass-through any unknown specifiers (including esc) */
- /* drop a null char in so printf stops at the end of this specifier,
- but put the real character back in (pseudo-const) */
if( length+templen > max )
templen = max-length;
- g_strlcat(s, p,max);
+ gchar *ident = g_strndup(p, templen);
+ g_strlcat(s, ident, max);
length+=templen;
+ g_free(ident);
} else {
gsize templen = strlen(temp);