From 5c2f94c8bfa7b98b3c832d0ce11c6ecdbd474029 Mon Sep 17 00:00:00 2001 From: waker Date: Thu, 31 Mar 2011 22:06:22 +0200 Subject: thread-safe config access --- plugins/shn/shn.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins/shn') diff --git a/plugins/shn/shn.c b/plugins/shn/shn.c index 87440ee2..4a90583c 100644 --- a/plugins/shn/shn.c +++ b/plugins/shn/shn.c @@ -306,8 +306,9 @@ shn_init_decoder (shn_fileinfo_t *info) { static void shn_init_config (void) { shn_cfg.error_output_method = ERROR_OUTPUT_DEVNULL; - strncpy (shn_cfg.seek_tables_path, deadbeef->conf_get_str ("shn.seektable_path", ""), sizeof (shn_cfg.seek_tables_path)); - strncpy (shn_cfg.relative_seek_tables_path, deadbeef->conf_get_str ("shn.relative_seektable_path", "seektables"), sizeof (shn_cfg.relative_seek_tables_path)); + + deadbeef->conf_get_str ("shn.seektable_path", "", shn_cfg.seek_tables_path, sizeof (shn_cfg.seek_tables_path)); + deadbeef->conf_get_str ("shn.relative_seektable_path", "seektables", shn_cfg.relative_seek_tables_path, sizeof (shn_cfg.relative_seek_tables_path)); shn_cfg.verbose = 0; shn_cfg.swap_bytes = deadbeef->conf_get_int ("shn.swap_bytes", 0); } -- cgit v1.2.3