X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fpbd%2Fstrsplit.cc;h=f82abf4c92430b7c64014c4c4eb21f70a4d1e22d;hb=130df9c2b195e82ba223ef8541802d775e947610;hp=342daadaa222f67906504f5acc1c30d77dae79b3;hpb=29f0d9732eb68fcaa22219cedddddd47bcaa8c17;p=ardour.git diff --git a/libs/pbd/strsplit.cc b/libs/pbd/strsplit.cc index 342daadaa2..f82abf4c92 100644 --- a/libs/pbd/strsplit.cc +++ b/libs/pbd/strsplit.cc @@ -17,7 +17,7 @@ */ -#include +#include "pbd/strsplit.h" using namespace std; using namespace Glib; @@ -50,7 +50,9 @@ split (string str, vector& result, char splitchar) remaining = str; while ((pos = remaining.find_first_of (splitchar)) != string::npos) { - result.push_back (remaining.substr (0, pos)); + if (pos != 0) { + result.push_back (remaining.substr (0, pos)); + } remaining = remaining.substr (pos+1); }