From bf11de80e432c1016375f932f5d1e879d04f8369 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Thu, 23 Aug 2012 11:59:02 +0000 Subject: [PATCH] fix --- src/transport/test_plugin_transport.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/transport/test_plugin_transport.c b/src/transport/test_plugin_transport.c index bc7df9880..c8aa43f44 100644 --- a/src/transport/test_plugin_transport.c +++ b/src/transport/test_plugin_transport.c @@ -450,7 +450,8 @@ run (void *cls, char *const *args, const char *cfgfile, /* load plugins... */ setup_plugin_environment (); - plugin = strrchr(argv[0],'_'); + GNUNET_assert (strlen (argv[0]) > strlen ("test_plugin_")); + plugin = strstr(argv[0],"test_plugin_"); sep = strrchr(argv[0],'.'); if (NULL == plugin) { @@ -458,7 +459,7 @@ run (void *cls, char *const *args, const char *cfgfile, end_badly_now (); return; } - plugin++; + plugin += strlen ("test_plugin_"); if (NULL != sep) sep[0] = '\0'; -- 2.25.1