From d428bbbcd4f4adf03e6515a534d190f909cb9de0 Mon Sep 17 00:00:00 2001 From: sukibaby <163092272+sukibaby@users.noreply.github.com> Date: Tue, 6 May 2025 06:17:03 -0700 Subject: [PATCH] Fix for Code scanning alert #40 "Unsigned difference expression compared to zero" --- src/RageUtil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RageUtil.cpp b/src/RageUtil.cpp index 301f879140..1df321b36b 100644 --- a/src/RageUtil.cpp +++ b/src/RageUtil.cpp @@ -755,7 +755,7 @@ void do_split( const S &Source, const C Delimitor, std::vector &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. */