Fix for Code scanning alert #40 "Unsigned difference expression compared to zero"

This commit is contained in:
sukibaby
2025-05-06 06:17:03 -07:00
committed by teejusb
parent 33a6912778
commit d428bbbcd4
+1 -1
View File
@@ -755,7 +755,7 @@ void do_split( const S &Source, const C Delimitor, std::vector<S> &AddIt, const
if( pos == Source.npos )
pos = Source.size();
if( pos-startpos > 0 || !bIgnoreEmpty )
if( pos > startpos || !bIgnoreEmpty )
{
/* Optimization: if we're copying the whole string, avoid substr; this
* allows this copy to be refcounted, which is much faster. */