From bdf7c81102849d4601c724cf36bc25d3d06deb12 Mon Sep 17 00:00:00 2001 From: Fernando Trebien Date: Thu, 17 Mar 2022 19:52:54 -0300 Subject: [PATCH] Fixed update bug --- rating.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rating.c b/rating.c index beed3fb..4426e28 100644 --- a/rating.c +++ b/rating.c @@ -67,7 +67,7 @@ rating_action_rate_helper(DB_plugin_action_t *action, int ctx, int rating) const char *dec = deadbeef->pl_find_meta_raw(it, ":DECODER"); char decoder_id[100]; if (dec) { - snprintf(decoder_id, sizeof(decoder_id), "%s\n", dec); + strncpy(decoder_id, dec, sizeof(decoder_id) - 1); } int match = it && dec; deadbeef->pl_unlock();