Mercurial > audlegacy-plugins
changeset 2710:1756960988e5
Replace a wtf static buffer with dynamic allocation.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 16 Jun 2008 06:20:03 +0300 |
parents | 04249b58c738 |
children | 183bd24000c9 |
files | src/cue/cuesheet.c |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/cue/cuesheet.c Mon Jun 16 05:48:57 2008 +0300 +++ b/src/cue/cuesheet.c Mon Jun 16 06:20:03 2008 +0300 @@ -158,10 +158,9 @@ for (i = 0; i < last_cue_track; i++) { - gchar _buf[65535]; - - g_snprintf(_buf, 65535, "cue://%s?%d", filename, i); - aud_playlist_add_url(aud_playlist_get_active(), _buf); + gchar *tmp = g_strdup_printf("cue://%s?%d", filename, i); + aud_playlist_add_url(aud_playlist_get_active(), tmp); + g_free(tmp); } free_cue_info(); @@ -190,7 +189,7 @@ play_thread = g_thread_self(); data->set_pb_ready(data); // it should be done in real input plugin? --yaz play_cue_uri(data, uri); - g_free(uri); uri = NULL; + g_free(uri); } static Tuple *get_tuple(gchar *uri)