aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy-gtk/empathy-theme-adium.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c
index c838800c1..74d5591b6 100644
--- a/libempathy-gtk/empathy-theme-adium.c
+++ b/libempathy-gtk/empathy-theme-adium.c
@@ -405,16 +405,18 @@ theme_adium_append_html (EmpathyThemeAdium *theme,
gchar *format = NULL;
gchar *end;
- /* Extract the time format if provided. */
- if (*cur == '{') {
- end = strstr (cur + 1, "}%");
+ /* Time can be in 2 formats:
+ * %time% or %time{strftime format}%
+ * Extract the time format if provided. */
+ if (cur[1] == '{') {
+ cur += 2;
+ end = strstr (cur, "}%");
if (!end) {
/* Invalid string */
continue;
}
- cur++;
format = g_strndup (cur, end - cur);
- cur = end;
+ cur = end + 1;
} else {
cur++;
}