diff host/simplehost.cpp @ 20:68b8b32a2070

* Add virtual destructors to PluginBase and Plugin to ensure subclass dtors get called * Fix buglet in host that caused plugin soname to be used as plugin name if no plugin name provided on command line * Add header dependencies to Makefile
author cannam
date Wed, 12 Apr 2006 12:32:18 +0000
parents 08ee18123f5a
children
line wrap: on
line diff
--- a/host/simplehost.cpp	Wed Apr 12 09:57:07 2006 +0000
+++ b/host/simplehost.cpp	Wed Apr 12 12:32:18 2006 +0000
@@ -75,9 +75,10 @@
     string wavname;
     if (argc >= 3) wavname = argv[2];
 
-    if (soname.find(":") >= 0) {
-        plugname = soname.substr(soname.find(":") + 1);
-        soname = soname.substr(0, soname.find(":"));
+    int sep = soname.find(":");
+    if (sep >= 0 && sep < soname.length()) {
+        plugname = soname.substr(sep + 1);
+        soname = soname.substr(0, sep);
     }
 
     void *libraryHandle = DLOPEN(soname, RTLD_LAZY);