lib/utils: small cleanups

Fix some static analysis warnings
This commit is contained in:
Dirk-Jan C. Binnema
2026-04-10 00:12:50 +03:00
committed by Seth Ladygo
parent d8afabcc0f
commit 6715ff418a
5 changed files with 33 additions and 28 deletions

View File

@ -112,7 +112,7 @@ public:
* @return true or false
*/
bool looking_at(std::string_view str) const {
if (pos_ >= html_.size() || pos_ + str.size() >= html_.size())
if (pos_ >= html_.size() || pos_ + str.size() > html_.size())
return false;
else
return matches({html_.data()+pos_, str.size()}, str);