From 7903fd08afd5a82c488b6991f43387ccca7350e4 Mon Sep 17 00:00:00 2001 From: Alexey Khromov Date: Thu, 24 Apr 2025 06:14:38 +0300 Subject: [PATCH] Fx nodelist_checkflag --- source/bforce/nodelist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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));