diff --git a/source/bforce/nodelist.c b/source/bforce/nodelist.c index 898b4e9..c0252a5 100644 --- a/source/bforce/nodelist.c +++ b/source/bforce/nodelist.c @@ -60,7 +60,7 @@ int nodelist_checkflag(const char *nodeflags, const char *flag) if ( nodeflags ) { while( p = strcasestr(searchbase, flag) ) // p - found flag { - if (*(p-1) == ',') + if ( ((p == searchbase)) || (*(p-1) == ',')) { if( (q = strchr(p, ',')) == NULL || (q - p) == strlen(flag) ) { DEB((D_NODELIST, "nodelist: found flag %s", flag));