diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2004-11-17 11:39:24 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2004-11-17 11:39:24 +0000 |
commit | a2adecc5b7f5a883aacc5e06b7600d21ac33e054 (patch) | |
tree | 40e64bd74e888c85fa7168952c395c31cea86eba | |
parent | c5d149f6a6df54dd08c53c3b6c032804dffac2af (diff) | |
download | xine-lib-a2adecc5b7f5a883aacc5e06b7600d21ac33e054.tar.gz xine-lib-a2adecc5b7f5a883aacc5e06b7600d21ac33e054.tar.bz2 |
fix stupid mistake (thanks Thibaut)
CVS patchset: 7131
CVS date: 2004/11/17 11:39:24
-rw-r--r-- | src/xine-engine/load_plugins.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index 480d8326e..4ea1f8084 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: load_plugins.c,v 1.188 2004/11/13 17:01:36 miguelfreitas Exp $ + * $Id: load_plugins.c,v 1.189 2004/11/17 11:39:24 miguelfreitas Exp $ * * * Load input/demux/audio_out/video_out/codec plugins @@ -805,6 +805,9 @@ static void load_plugin_list(FILE *fp, xine_list_t *plugins) { while (fgets (line, 1023, fp)) { if (line[0] == '#') continue; + + if( (value = strchr(line, '\r')) || (value = strchr(line, '\n')) ) + *value = (char) 0; /* eliminate any cr/lf */ if (line[0] == '[' && version_ok) { if((value = strchr (line, ']'))) @@ -813,7 +816,6 @@ static void load_plugin_list(FILE *fp, xine_list_t *plugins) { if( node ) { xine_list_append_content (plugins, node); } - line[strlen(line)-1]= (char) 0; /* eliminate lf */ node = xine_xmalloc(sizeof(plugin_node_t)); node->filename = strdup(line+1); node->info = xine_xmalloc(2*sizeof(plugin_info_t)); |