changeset 2954:cfb04f784a84 trunk

user g_strdup_printf instead of fixed-size gchar array
author Tomasz Mon <desowin@gmail.com>
date Sun, 01 Jul 2007 16:37:52 +0200
parents 80b6fc3f4d29
children 2f9da2fd5f02
files src/audacious/genevent.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/genevent.c	Sun Jul 01 08:40:46 2007 -0500
+++ b/src/audacious/genevent.c	Sun Jul 01 16:37:52 2007 +0200
@@ -89,12 +89,12 @@
         }
 
         if (mainwin_sposition != NULL && !mainwin_sposition->hs_pressed) {
-            gchar time_str[5];
+            gchar *time_str;
 
-            g_snprintf(time_str, sizeof(time_str), "%2.2d", timeleft / 60);
+            time_str = g_strdup_printf("%2.2d", timeleft / 60);
             ui_skinned_textbox_set_text(mainwin_stime_min, time_str);
 
-            g_snprintf(time_str, sizeof(time_str), "%2.2d", timeleft % 60);
+            time_str = g_strdup_printf("%2.2d", timeleft % 60);
             ui_skinned_textbox_set_text(mainwin_stime_sec, time_str);
         }